Commit 98ea81e6 authored by Rovanion's avatar Rovanion Committed by Rovanion Luckey

Restart works again, grammar mistakes corrected.

parent cda4d688
...@@ -188,7 +188,11 @@ stop() { ...@@ -188,7 +188,11 @@ stop() {
# Returns the status of GitLab and it's components # Returns the status of GitLab and it's components
status() { 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 if [ "$web_status" = "0" ]; then
echo "The GitLab Unicorn webserver with pid $wpid is running." echo "The GitLab Unicorn webserver with pid $wpid is running."
else else
...@@ -207,13 +211,13 @@ status() { ...@@ -207,13 +211,13 @@ status() {
reload(){ reload(){
exit_if_not_running exit_if_not_running
if [ "$wpid" = "0" ];then 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 exit 1
fi fi
printf "Reloading GitLab Unicorn configuration... " printf "Reloading GitLab Unicorn configuration... "
kill -USR2 "$wpid" kill -USR2 "$wpid"
echo "Done." 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 RAILS_ENV=$RAILS_ENV bundle exec rake sidekiq:stop
echo "Starting Sidekiq..." echo "Starting Sidekiq..."
RAILS_ENV=$RAILS_ENV bundle exec rake sidekiq:start RAILS_ENV=$RAILS_ENV bundle exec rake sidekiq:start
...@@ -222,6 +226,14 @@ reload(){ ...@@ -222,6 +226,14 @@ reload(){
status status
} }
restart(){
check_status
if [ "$web_status" = "0" -o "$sidekiq_status" = "0" ]; then
stop
fi
start
}
## Finally the input handling. ## Finally the input handling.
...@@ -233,8 +245,7 @@ case "$1" in ...@@ -233,8 +245,7 @@ case "$1" in
stop stop
;; ;;
restart) restart)
stop restart
start
;; ;;
reload|force-reload) reload|force-reload)
reload reload
......
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