Skip to content

Commit ba2fca2

Browse files
committed
fix debian systemV init script status command sbt#552
1 parent aacce7f commit ba2fca2

File tree

1 file changed

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

1 file changed

+2
-15
lines changed

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

+2-15
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,9 @@ case "$1" in
7070
exit $?
7171
;;
7272
status)
73-
start-stop-daemon --status --pidfile "$PIDFILE"
74-
case "$?" in
75-
0)
76-
echo "${{app_name}} is running"
77-
;;
78-
1)
79-
echo "${{app_name}} is not running and the pid file exists"
80-
;;
81-
3)
82-
echo "${{app_name}} is not running"
83-
;;
84-
*)
85-
echo "Unable to determine ${{app_name}} status"
86-
;;
73+
status_of_proc -p "$PIDFILE" "$RUN_CMD" ${{app_name}} && exit 0 || exit $?
8774
esac
88-
exit $?
75+
exit retval
8976
;;
9077
*)
9178
log_daemon_msg "Usage: /etc/init.d/${{app_name}} {start|stop|restart|status}"

0 commit comments

Comments
 (0)