mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
parent
b0221c5e13
commit
f9eb5ac1a8
@ -3,6 +3,8 @@
|
||||
|
||||
namespace Icinga\Clicommands;
|
||||
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Modules\Manager;
|
||||
use Icinga\Cli\Command;
|
||||
|
||||
/**
|
||||
@ -14,6 +16,9 @@ use Icinga\Cli\Command;
|
||||
*/
|
||||
class ModuleCommand extends Command
|
||||
{
|
||||
/**
|
||||
* @var Manager
|
||||
*/
|
||||
protected $modules;
|
||||
|
||||
public function init()
|
||||
@ -109,7 +114,12 @@ class ModuleCommand extends Command
|
||||
if (! $module || $this->hasRemainingParams()) {
|
||||
return $this->showUsage();
|
||||
}
|
||||
$this->modules->disableModule($module);
|
||||
|
||||
if ($this->modules->hasEnabled($module)) {
|
||||
$this->modules->disableModule($module);
|
||||
} else {
|
||||
Logger::info('Module "%s" is already disabled', $module);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user