From 0c9f186d8afcfe8c70f1c967b7fdf6044e4606ea Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 29 May 2023 21:49:22 +0200 Subject: [PATCH] added service bin --- src/bin/Service.hx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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"); }