Skip to content

Commit

Permalink
Merge pull request #562 from kardapoltsev/wip/status_exit_code
Browse files Browse the repository at this point in the history
Fix debian systemV init script status command #552
  • Loading branch information
muuki88 committed Apr 26, 2015
2 parents 8261894 + 28ca0c0 commit 3c135ba
Showing 1 changed file with 1 addition and 16 deletions.
Expand Up @@ -63,22 +63,7 @@ case "$1" in
exit $?
;;
status)
start-stop-daemon --status --pidfile "$PIDFILE"
case "$?" in
0)
echo "${{app_name}} is running"
;;
1)
echo "${{app_name}} is not running and the pid file exists"
;;
3)
echo "${{app_name}} is not running"
;;
*)
echo "Unable to determine ${{app_name}} status"
;;
esac
exit $?
status_of_proc -p "$PIDFILE" "$RUN_CMD" ${{app_name}} && exit 0 || exit $?
;;
*)
log_daemon_msg "Usage: /etc/init.d/${{app_name}} {start|stop|restart|status}"
Expand Down

0 comments on commit 3c135ba

Please sign in to comment.