Skip to content

Commit 862cea4

Browse files
committed
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
1 parent 057330b commit 862cea4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

init/sysvinit/centos/gitlab-unicorn

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ query_status() {
101101
case "$1" in
102102
start)
103103
query_status && exit 0
104-
start
104+
start || exit 1
105105
;;
106106
stop)
107107
query_status || exit 0
108-
stop
108+
stop || exit 1
109109
;;
110110
restart)
111-
restart
111+
restart || exit 1
112112
;;
113113
status)
114114
get_status
@@ -121,5 +121,4 @@ case "$1" in
121121
;;
122122
esac
123123

124-
exit 0
125-
124+
exit 0

0 commit comments

Comments
 (0)