mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
Improve feedback when creating the configuration directory using the CLI
The user gets now a success message as well as not a failure message in case the directory already exists. refs #7163
This commit is contained in:
parent
231fbaba37
commit
c6b18d2f3d
@ -102,8 +102,8 @@ class SetupCommand extends Command
|
||||
|
||||
$path = $this->params->get('path', $this->app->getConfigDir());
|
||||
if (file_exists($path)) {
|
||||
$this->fail(sprintf($this->translate('Path "%s" already exists.'), $path));
|
||||
return false;
|
||||
printf($this->translate("Configuration directory already exists at: %s\n"), $path);
|
||||
return true;
|
||||
}
|
||||
|
||||
$mode = octdec($this->params->get('mode', '2775'));
|
||||
@ -116,6 +116,8 @@ class SetupCommand extends Command
|
||||
chmod($path, $mode);
|
||||
umask($old);
|
||||
chgrp($path, $group);
|
||||
|
||||
printf($this->translate("Successfully created configuration directory at: %s\n"), $path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user