Commit 4a715c73 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'init_exit_status' of /home/git/repositories/gitlab/gitlabhq

parents ff7073ac 4727fa3f
...@@ -102,6 +102,13 @@ check_status(){ ...@@ -102,6 +102,13 @@ check_status(){
else else
sidekiq_status="-1" sidekiq_status="-1"
fi fi
if [ $web_status = 0 -a $sidekiq_status = 0 ]; then
gitlab_status=0
else
# http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
# code 3 means 'program is not running'
gitlab_status=3
fi
} }
## Check for stale pids and remove them if necessary. ## Check for stale pids and remove them if necessary.
...@@ -275,6 +282,7 @@ case "$1" in ...@@ -275,6 +282,7 @@ case "$1" in
;; ;;
status) status)
print_status print_status
exit $gitlab_status
;; ;;
*) *)
echo "Usage: service gitlab {start|stop|restart|reload|status}" echo "Usage: service gitlab {start|stop|restart|reload|status}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment