Skip to content
Snippets Groups Projects
Commit d0765497 authored by jurgenhaas's avatar jurgenhaas
Browse files

Only chown for existing files

parent 45b13f5a
No related branches found
No related tags found
1 merge request!10Merging develop into main
Pipeline #783502 passed
......@@ -184,8 +184,12 @@ class Traefik {
$upd2 = $this->updateFile($traefikFile, Yaml::dump($this->defaultDockerCompose(), 9, 2));
if ($upd1 || $upd2) {
if ($user) {
$fs->chown($traefikConfigPath . '/certificates.toml', $user, TRUE);
$fs->chown($traefikFile, $user, TRUE);
if (file_exists($traefikConfigPath . '/certificates.toml')) {
$fs->chown($traefikConfigPath . '/certificates.toml', $user, TRUE);
}
if (file_exists($traefikFile)) {
$fs->chown($traefikFile, $user, TRUE);
}
}
$cwd = getcwd();
chdir($traefikPath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment