Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-25 13:26:22 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-25 13:26:22 +0400
commit4727fa3fcce5e42cdbd1e89e167d674cf23676be (patch)
tree129c16a8c9ac11a5b9be005c6240af611317b3c9 /lib/support
parent3c11359910892daefc68d698fe28cf0862683fde (diff)
Report application status through init exit code
Diffstat (limited to 'lib/support')
-rwxr-xr-xlib/support/init.d/gitlab8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab
index ddcc5d666c9..fbb7380ac47 100755
--- a/lib/support/init.d/gitlab
+++ b/lib/support/init.d/gitlab
@@ -102,6 +102,13 @@ check_status(){
else
sidekiq_status="-1"
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.
@@ -275,6 +282,7 @@ case "$1" in
;;
status)
print_status
+ exit $gitlab_status
;;
*)
echo "Usage: service gitlab {start|stop|restart|reload|status}"