From af23c2e0a154d073aa3d5731a44b0c83b413a2fc Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Fri, 31 Mar 2017 10:58:23 +0200 Subject: [PATCH] [enh] #668: return exit values on daemon status: - https://nodejs.org/api/process.html#process_exit_codes - this will allow me to partially fix: - https://github.com/YunoHost-Apps/duniter_ynh/issues/21 - stop daemon will only be done when daemon running. --- bin/daemon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/daemon b/bin/daemon index 723c50b7b..ad2748e69 100755 --- a/bin/daemon +++ b/bin/daemon @@ -20,10 +20,11 @@ switch (process.argv[2]) { case "status": if (daemon.status()) { console.log('Duniter daemon status: running'); + process.exit(0) } else { console.log('Duniter daemon status: stopped'); + process.exit(2) } - break; case "sync": case "reset": -- GitLab