diff options
author | Rovanion <rovanion.luckey@gmail.com> | 2013-08-29 23:26:08 +0200 |
---|---|---|
committer | Rovanion Luckey <rovanion.luckey@gmail.com> | 2013-08-29 23:29:38 +0200 |
commit | 98ea81e65956cb37fc67c03e3a88c29c6932b12c (patch) | |
tree | b0f550bb1fbf6e8adb7c0bd8728591f88d546832 | |
parent | cda4d6881aba6ebcdd71a8f1c47976e77cf9e9aa (diff) | |
download | gitlab-ce-98ea81e65956cb37fc67c03e3a88c29c6932b12c.tar.gz |
Restart works again, grammar mistakes corrected.
-rwxr-xr-x | lib/support/init.d/gitlab | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab index 00bd7a460c2..a05227ceb1b 100755 --- a/lib/support/init.d/gitlab +++ b/lib/support/init.d/gitlab @@ -188,7 +188,11 @@ stop() { # Returns the status of GitLab and it's components status() { - exit_if_not_running + check_status + if [ "$web_status" != "0" -a "$sidekiq_status" != "0" ]; then + echo "GitLab is not running." + return + fi if [ "$web_status" = "0" ]; then echo "The GitLab Unicorn webserver with pid $wpid is running." else @@ -207,13 +211,13 @@ status() { reload(){ exit_if_not_running if [ "$wpid" = "0" ];then - echo "The GitLab Unicorn Web server is not running thus it's configuration can't be reloaded." + echo "The GitLab Unicorn Web server is not running thus its configuration can't be reloaded." exit 1 fi printf "Reloading GitLab Unicorn configuration... " kill -USR2 "$wpid" echo "Done." - echo "Restarting GitLab Sidekiq since it isn't capable of reloading it's config..." + echo "Restarting GitLab Sidekiq since it isn't capable of reloading its config..." RAILS_ENV=$RAILS_ENV bundle exec rake sidekiq:stop echo "Starting Sidekiq..." RAILS_ENV=$RAILS_ENV bundle exec rake sidekiq:start @@ -222,6 +226,14 @@ reload(){ status } +restart(){ + check_status + if [ "$web_status" = "0" -o "$sidekiq_status" = "0" ]; then + stop + fi + start +} + ## Finally the input handling. @@ -233,8 +245,7 @@ case "$1" in stop ;; restart) - stop - start + restart ;; reload|force-reload) reload |