Skip to content

Commit 3c135ba

Browse files
committed
Merge pull request #562 from kardapoltsev/wip/status_exit_code
Fix debian systemV init script status command #552
2 parents 8261894 + 28ca0c0 commit 3c135ba

File tree

1 file changed

+1
-16
lines changed
  • src/main/resources/com/typesafe/sbt/packager/archetypes/java_server/systemloader/systemv

1 file changed

+1
-16
lines changed

src/main/resources/com/typesafe/sbt/packager/archetypes/java_server/systemloader/systemv/start-debian-template

+1-16
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,7 @@ case "$1" in
6363
exit $?
6464
;;
6565
status)
66-
start-stop-daemon --status --pidfile "$PIDFILE"
67-
case "$?" in
68-
0)
69-
echo "${{app_name}} is running"
70-
;;
71-
1)
72-
echo "${{app_name}} is not running and the pid file exists"
73-
;;
74-
3)
75-
echo "${{app_name}} is not running"
76-
;;
77-
*)
78-
echo "Unable to determine ${{app_name}} status"
79-
;;
80-
esac
81-
exit $?
66+
status_of_proc -p "$PIDFILE" "$RUN_CMD" ${{app_name}} && exit 0 || exit $?
8267
;;
8368
*)
8469
log_daemon_msg "Usage: /etc/init.d/${{app_name}} {start|stop|restart|status}"

0 commit comments

Comments
 (0)