Skip to content

Commit

Permalink
[enh] #668: return exit values on daemon status:
Browse files Browse the repository at this point in the history
- https://nodejs.org/api/process.html#process_exit_codes
- this will allow me to partially fix:
 - YunoHost-Apps/duniter_ynh#21
 - stop daemon will only be done when daemon running.
  • Loading branch information
M5oul committed Mar 31, 2017
1 parent b033c8a commit af23c2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/daemon
Expand Up @@ -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":
Expand Down

0 comments on commit af23c2e

Please sign in to comment.