diff --git a/src/bin/Service.hx b/src/bin/Service.hx index 7537de5..93162ea 100644 --- a/src/bin/Service.hx +++ b/src/bin/Service.hx @@ -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"); }