@@ -85,7 +85,7 @@ check_pids(){
85
85
wait_for_pids (){
86
86
# We are sleeping a bit here mostly because sidekiq is slow at writing it's pid
87
87
i=0;
88
- while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || { [ " $mail_room_enabled " = true ] && [ ! -f $mail_room_pid_path ] }; do
88
+ while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || { [ " $mail_room_enabled " = true ] && [ ! -f $mail_room_pid_path ]; }; do
89
89
sleep 0.1;
90
90
i=$(( i+ 1 ))
91
91
if [ $(( i% 10 )) = 0 ]; then
@@ -128,7 +128,7 @@ check_status(){
128
128
mail_room_status=" -1"
129
129
fi
130
130
fi
131
- if [ $web_status = 0 ] && [ $sidekiq_status = 0 ] && { [ " $mail_room_enabled " != true ] || [ $mail_room_status = 0 ] }; then
131
+ if [ $web_status = 0 ] && [ $sidekiq_status = 0 ] && { [ " $mail_room_enabled " != true ] || [ $mail_room_status = 0 ]; }; then
132
132
gitlab_status=0
133
133
else
134
134
# http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
@@ -168,7 +168,7 @@ check_stale_pids(){
168
168
# # If no parts of the service is running, bail out.
169
169
exit_if_not_running (){
170
170
check_stale_pids
171
- if [ " $web_status " != " 0" ] && [ " $sidekiq_status " != " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " != " 0" ] }; then
171
+ if [ " $web_status " != " 0" ] && [ " $sidekiq_status " != " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " != " 0" ]; }; then
172
172
echo " GitLab is not running."
173
173
exit
174
174
fi
@@ -179,13 +179,13 @@ start_gitlab() {
179
179
check_stale_pids
180
180
181
181
if [ " $web_status " != " 0" ]; then
182
- echo -n " Starting GitLab Unicorn"
182
+ echo " Starting GitLab Unicorn"
183
183
fi
184
184
if [ " $sidekiq_status " != " 0" ]; then
185
- echo -n " Starting GitLab Sidekiq"
185
+ echo " Starting GitLab Sidekiq"
186
186
fi
187
187
if [ " $mail_room_enabled " = true ] && [ " $mail_room_status " != " 0" ]; then
188
- echo -n " Starting GitLab MailRoom"
188
+ echo " Starting GitLab MailRoom"
189
189
fi
190
190
191
191
# Then check if the service is running. If it is: don't start again.
@@ -225,13 +225,13 @@ stop_gitlab() {
225
225
exit_if_not_running
226
226
227
227
if [ " $web_status " = " 0" ]; then
228
- echo -n " Shutting down GitLab Unicorn"
228
+ echo " Shutting down GitLab Unicorn"
229
229
fi
230
230
if [ " $sidekiq_status " = " 0" ]; then
231
- echo -n " Shutting down GitLab Sidekiq"
231
+ echo " Shutting down GitLab Sidekiq"
232
232
fi
233
233
if [ " $mail_room_enabled " = true ] && [ " $mail_room_status " = " 0" ]; then
234
- echo -n " Shutting down GitLab MailRoom"
234
+ echo " Shutting down GitLab MailRoom"
235
235
fi
236
236
237
237
# If the Unicorn web server is running, tell it to stop;
@@ -248,11 +248,11 @@ stop_gitlab() {
248
248
fi
249
249
250
250
# If something needs to be stopped, lets wait for it to stop. Never use SIGKILL in a script.
251
- while [ " $web_status " = " 0" ] || [ " $sidekiq_status " = " 0" ] || { [ " $mail_room_enabled " = true ] && [ " $mail_room_status " = " 0" ] }; do
251
+ while [ " $web_status " = " 0" ] || [ " $sidekiq_status " = " 0" ] || { [ " $mail_room_enabled " = true ] && [ " $mail_room_status " = " 0" ]; }; do
252
252
sleep 1
253
253
check_status
254
254
printf " ."
255
- if [ " $web_status " != " 0" ] && [ " $sidekiq_status " != " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " != " 0" ] }; then
255
+ if [ " $web_status " != " 0" ] && [ " $sidekiq_status " != " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " != " 0" ]; }; then
256
256
printf " \n"
257
257
break
258
258
fi
@@ -272,7 +272,7 @@ stop_gitlab() {
272
272
# # Prints the status of GitLab and it's components.
273
273
print_status () {
274
274
check_status
275
- if [ " $web_status " != " 0" ] && [ " $sidekiq_status " != " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " != " 0" ] }; then
275
+ if [ " $web_status " != " 0" ] && [ " $sidekiq_status " != " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " != " 0" ]; }; then
276
276
echo " GitLab is not running."
277
277
return
278
278
fi
@@ -292,8 +292,8 @@ print_status() {
292
292
else
293
293
printf " The GitLab MailRoom email processor is \033[31mnot running\033[0m.\n"
294
294
fi
295
- end
296
- if [ " $web_status " = " 0" ] && [ " $sidekiq_status " = " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " = " 0" ] }; then
295
+ fi
296
+ if [ " $web_status " = " 0" ] && [ " $sidekiq_status " = " 0" ] && { [ " $mail_room_enabled " != true ] || [ " $mail_room_status " = " 0" ]; }; then
297
297
printf " GitLab and all its components are \033[32mup and running\033[0m.\n"
298
298
fi
299
299
}
@@ -324,7 +324,7 @@ reload_gitlab(){
324
324
# # Restarts Sidekiq and Unicorn.
325
325
restart_gitlab (){
326
326
check_status
327
- if [ " $web_status " = " 0" ] || [ " $sidekiq_status " = " 0" ] || { [ " $mail_room_enabled " = true ] && [ " $mail_room_status " = " 0" ] }; then
327
+ if [ " $web_status " = " 0" ] || [ " $sidekiq_status " = " 0" ] || { [ " $mail_room_enabled " = true ] && [ " $mail_room_status " = " 0" ]; }; then
328
328
stop_gitlab
329
329
fi
330
330
start_gitlab
0 commit comments