mirror of
https://github.com/gitlabhq/gitlab-recipes.git
synced 2026-01-10 06:58:06 -05:00
Exit with appropriate return codes on failures
A number of systems expect a non-zero exit code on failure For restart, we care about the status of start
This commit is contained in:
@@ -101,14 +101,14 @@ query_status() {
|
||||
case "$1" in
|
||||
start)
|
||||
query_status && exit 0
|
||||
start
|
||||
start || exit 1
|
||||
;;
|
||||
stop)
|
||||
query_status || exit 0
|
||||
stop
|
||||
stop || exit 1
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
restart || exit 1
|
||||
;;
|
||||
status)
|
||||
get_status
|
||||
@@ -121,5 +121,4 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user