Commit aabd90a828eeb1b1c2fd82afd674d965aaa2dde3

Authored by Dmitriy Zaporozhets
2 parents 5d966ccd ad7cd8fb

Merge branch 'master' of github.com:gitlabhq/gitlabhq

Showing 1 changed file with 11 additions and 11 deletions   Show diff stats
lib/support/init.d/gitlab
@@ -149,7 +149,7 @@ exit_if_not_running(){ @@ -149,7 +149,7 @@ exit_if_not_running(){
149 } 149 }
150 150
151 ## Starts Unicorn and Sidekiq if they're not running. 151 ## Starts Unicorn and Sidekiq if they're not running.
152 -start() { 152 +start_gitlab() {
153 check_stale_pids 153 check_stale_pids
154 154
155 if [ "$web_status" != "0" -a "$sidekiq_status" != "0" ]; then 155 if [ "$web_status" != "0" -a "$sidekiq_status" != "0" ]; then
@@ -167,7 +167,7 @@ start() { @@ -167,7 +167,7 @@ start() {
167 # Remove old socket if it exists 167 # Remove old socket if it exists
168 rm -f "$socket_path"/gitlab.socket 2>/dev/null 168 rm -f "$socket_path"/gitlab.socket 2>/dev/null
169 # Start the web server 169 # Start the web server
170 - RAILS_ENV=$RAILS_ENV script/web start & 170 + RAILS_ENV=$RAILS_ENV script/web start
171 fi 171 fi
172 172
173 # If sidekiq is already running, don't start it again. 173 # If sidekiq is already running, don't start it again.
@@ -184,7 +184,7 @@ start() { @@ -184,7 +184,7 @@ start() {
184 } 184 }
185 185
186 ## Asks the Unicorn and the Sidekiq if they would be so kind as to stop, if not kills them. 186 ## Asks the Unicorn and the Sidekiq if they would be so kind as to stop, if not kills them.
187 -stop() { 187 +stop_gitlab() {
188 exit_if_not_running 188 exit_if_not_running
189 189
190 if [ "$web_status" = "0" -a "$sidekiq_status" = "0" ]; then 190 if [ "$web_status" = "0" -a "$sidekiq_status" = "0" ]; then
@@ -246,7 +246,7 @@ print_status() { @@ -246,7 +246,7 @@ print_status() {
246 } 246 }
247 247
248 ## Tells unicorn to reload it's config and Sidekiq to restart 248 ## Tells unicorn to reload it's config and Sidekiq to restart
249 -reload(){ 249 +reload_gitlab(){
250 exit_if_not_running 250 exit_if_not_running
251 if [ "$wpid" = "0" ];then 251 if [ "$wpid" = "0" ];then
252 echo "The GitLab Unicorn Web server is not running thus its configuration can't be reloaded." 252 echo "The GitLab Unicorn Web server is not running thus its configuration can't be reloaded."
@@ -263,12 +263,12 @@ reload(){ @@ -263,12 +263,12 @@ reload(){
263 } 263 }
264 264
265 ## Restarts Sidekiq and Unicorn. 265 ## Restarts Sidekiq and Unicorn.
266 -restart(){ 266 +restart_gitlab(){
267 check_status 267 check_status
268 if [ "$web_status" = "0" -o "$sidekiq_status" = "0" ]; then 268 if [ "$web_status" = "0" -o "$sidekiq_status" = "0" ]; then
269 - stop 269 + stop_gitlab
270 fi 270 fi
271 - start 271 + start_gitlab
272 } 272 }
273 273
274 274
@@ -276,16 +276,16 @@ restart(){ @@ -276,16 +276,16 @@ restart(){
276 276
277 case "$1" in 277 case "$1" in
278 start) 278 start)
279 - start 279 + start_gitlab
280 ;; 280 ;;
281 stop) 281 stop)
282 - stop 282 + stop_gitlab
283 ;; 283 ;;
284 restart) 284 restart)
285 - restart 285 + restart_gitlab
286 ;; 286 ;;
287 reload|force-reload) 287 reload|force-reload)
288 - reload 288 + reload_gitlab
289 ;; 289 ;;
290 status) 290 status)
291 print_status 291 print_status