Skip to content
Snippets Groups Projects
Commit af23c2e0 authored by Moul's avatar Moul
Browse files

[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.
parent b033c8ad
Branches
Tags
1 merge request!922[enh] return exit values on daemon status
......@@ -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":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment