added service bin

This commit is contained in:
Djeeberjr 2023-05-29 21:49:22 +02:00
parent 560c85ea61
commit 0c9f186d8a

View File

@ -43,10 +43,24 @@ class Service extends CLIAppBase {
},"Register a new service");
registerSyncSubcommand("unregister", (args) ->{
return true;
if (args.length < 2) {
return false;
}
var name = args[0];
var result = ServiceManager.instace.unregister(name);
return handleResult(result);
},"Unregister a service");
registerSyncSubcommand("list", (args) ->{
var list = ServiceManager.instace.listRunning();
for (name in list) {
this.handle.writeLine(name);
}
return true;
},"List all services");
}