Commit 9422b451eb622196036ec3429bb61ac9a7078c2a

Authored by Pawel Krzaczkowski
1 parent c818712d

Init script - change start() stop() restart() reload() to xxxx_gitlab()

Showing 1 changed file with 10 additions and 10 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
@@ -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