enable services via cli
This commit is contained in:
parent
30304ec5e6
commit
cd6808e62c
@ -63,6 +63,15 @@ class Service extends CLIAppBase {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
},"List all services");
|
},"List all services");
|
||||||
|
|
||||||
|
registerSyncSubcommand("enable", (args) ->{
|
||||||
|
if (args.length < 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ServiceManager.instance.enable(args[0]);
|
||||||
|
return true;
|
||||||
|
},"Enable a service");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleResult(res: Outcome<Noise,String>): Bool {
|
private function handleResult(res: Outcome<Noise,String>): Bool {
|
||||||
|
@ -19,7 +19,7 @@ class ServiceManager {
|
|||||||
/**
|
/**
|
||||||
Add a service to be automatically started.
|
Add a service to be automatically started.
|
||||||
**/
|
**/
|
||||||
private function enable(name: String) {
|
public function enable(name: String) {
|
||||||
if (!this.services.exists(name)){
|
if (!this.services.exists(name)){
|
||||||
return; // Service must be started
|
return; // Service must be started
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user