Navigation Menu

Skip to content

Commit

Permalink
deb: improve compatibility to LSB about status action (exit codes)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Jun 24, 2013
1 parent 8752b3f commit 4d4cc0a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/debian/groonga-httpd.init
Expand Up @@ -174,7 +174,10 @@ case "$1" in
;;
status)
do_status
exit $?
case "$?" in
0) ;; # service is OK
*) exit 3 ;; # program is not running
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
Expand Down
5 changes: 4 additions & 1 deletion packages/debian/groonga-server-gqtp.init
Expand Up @@ -219,7 +219,10 @@ case "$1" in
;;
status)
do_status
exit $?
case "$?" in
0) ;; # service is OK
*) exit 3 ;; # program is not running
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
Expand Down
14 changes: 13 additions & 1 deletion packages/debian/groonga-server-http.init
Expand Up @@ -225,7 +225,19 @@ case "$1" in
;;
status)
do_status
exit $?
case "$?" in
0)
# service is OK
;;
1|2|3|4|5|6|7)
# curl can't connect to host, service status is unknown
exit 4
;;
*)
# treat as program is not running
exit 3
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
Expand Down

0 comments on commit 4d4cc0a

Please sign in to comment.