BigW Consortium Gitlab

gitlab 17.2 KB
Newer Older
Rovanion committed
1
#! /bin/sh
2 3 4

# GITLAB
# Maintainer: @randx
Rovanion committed
5
# Authors: rovanion.luckey@gmail.com, @randx
6 7 8 9 10 11 12 13 14

### BEGIN INIT INFO
# Provides:          gitlab
# Required-Start:    $local_fs $remote_fs $network $syslog redis-server
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: GitLab git repository management
# Description:       GitLab git repository management
15
# chkconfig: - 85 14
16 17
### END INIT INFO

18 19 20 21 22

###
# DO NOT EDIT THIS FILE!
# This file will be overwritten on update.
# Instead add/change your variables in /etc/default/gitlab
23
# An example defaults file can be found in lib/support/init.d/gitlab.default.example
24 25 26
###


Rovanion committed
27 28
### Environment variables
RAILS_ENV="production"
29

30 31
# Script variable names should be lower-case not to conflict with
# internal /bin/sh variables such as PATH, EDITOR or SHELL.
32
app_user="git"
33
app_root="/home/$app_user/gitlab"
Rovanion committed
34 35
pid_path="$app_root/tmp/pids"
socket_path="$app_root/tmp/sockets"
36
rails_socket="$socket_path/gitlab.socket"
Rovanion committed
37 38
web_server_pid_path="$pid_path/unicorn.pid"
sidekiq_pid_path="$pid_path/sidekiq.pid"
Douwe Maan committed
39 40
mail_room_enabled=false
mail_room_pid_path="$pid_path/mail_room.pid"
41
gitlab_workhorse_dir=$(cd $app_root/../gitlab-workhorse 2> /dev/null && pwd)
42
gitlab_workhorse_pid_path="$pid_path/gitlab-workhorse.pid"
43
gitlab_workhorse_options="-listenUmask 0 -listenNetwork unix -listenAddr $socket_path/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket $rails_socket -documentRoot $app_root/public"
44
gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
45 46 47 48 49
gitlab_pages_enabled=false
gitlab_pages_dir=$(cd $app_root/../gitlab-pages 2> /dev/null && pwd)
gitlab_pages_pid_path="$pid_path/gitlab-pages.pid"
gitlab_pages_options="-pages-domain example.com -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090"
gitlab_pages_log="$app_root/log/gitlab-pages.log"
50
shell_path="/bin/bash"
51
gitaly_enabled=true
52 53 54
gitaly_dir=$(cd $app_root/../gitaly 2> /dev/null && pwd)
gitaly_pid_path="$pid_path/gitaly.pid"
gitaly_log="$app_root/log/gitaly.log"
Rovanion committed
55

56 57
# Read configuration variable file if it is present
test -f /etc/default/gitlab && . /etc/default/gitlab
Rovanion committed
58 59

# Switch to the app_user if it is not he/she who is running the script.
60
if [ `whoami` != "$app_user" ]; then
61
  eval su - "$app_user" -c $(echo \")$shell_path -l -c \'$0 "$@"\'$(echo \"); exit;
Rovanion committed
62 63
fi

64
# Switch to the gitlab path, exit on failure.
Rovanion committed
65 66 67 68
if ! cd "$app_root" ; then
 echo "Failed to cd into $app_root, exiting!";  exit 1
fi

69

Rovanion committed
70 71
### Init Script functions

72
## Gets the pids from the files
Rovanion committed
73 74 75 76 77 78 79 80 81 82 83 84 85
check_pids(){
  if ! mkdir -p "$pid_path"; then
    echo "Could not create the path $pid_path needed to store the pids."
    exit 1
  fi
  # If there exists a file which should hold the value of the Unicorn pid: read it.
  if [ -f "$web_server_pid_path" ]; then
    wpid=$(cat "$web_server_pid_path")
  else
    wpid=0
  fi
  if [ -f "$sidekiq_pid_path" ]; then
    spid=$(cat "$sidekiq_pid_path")
86
  else
Rovanion committed
87
    spid=0
88
  fi
89 90
  if [ -f "$gitlab_workhorse_pid_path" ]; then
    hpid=$(cat "$gitlab_workhorse_pid_path")
91 92 93
  else
    hpid=0
  fi
Douwe Maan committed
94 95 96 97 98 99 100
  if [ "$mail_room_enabled" = true ]; then
    if [ -f "$mail_room_pid_path" ]; then
      mpid=$(cat "$mail_room_pid_path")
    else
      mpid=0
    fi
  fi
101 102 103 104 105 106 107
  if [ "$gitlab_pages_enabled" = true ]; then
    if [ -f "$gitlab_pages_pid_path" ]; then
      gppid=$(cat "$gitlab_pages_pid_path")
    else
      gppid=0
    fi
  fi
108 109 110 111 112 113 114
  if [ "$gitaly_enabled" = true ]; then
    if [ -f "$gitaly_pid_path" ]; then
      gapid=$(cat "$gitaly_pid_path")
    else
      gapid=0
    fi
  fi
115 116
}

117 118
## Called when we have started the two processes and are waiting for their pid files.
wait_for_pids(){
119
  # We are sleeping a bit here mostly because sidekiq is slow at writing its pid
120
  i=0;
121
  while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || [ ! -f $gitlab_workhorse_pid_path ] || { [ "$mail_room_enabled" = true ] && [ ! -f $mail_room_pid_path ]; } || { [ "$gitlab_pages_enabled" = true ] && [ ! -f $gitlab_pages_pid_path ]; } || { [ "$gitaly_enabled" = true ] && [ ! -f $gitaly_pid_path ]; }; do
122 123 124 125 126 127 128 129 130 131 132 133
    sleep 0.1;
    i=$((i+1))
    if [ $((i%10)) = 0 ]; then
      echo -n "."
    elif [ $((i)) = 301 ]; then
      echo "Waited 30s for the processes to write their pids, something probably went wrong."
      exit 1;
    fi
  done
  echo
}

Rovanion committed
134
# We use the pids in so many parts of the script it makes sense to always check them.
135
# Only after start() is run should the pids change. Sidekiq sets its own pid.
Rovanion committed
136 137 138
check_pids


139
## Checks whether the different parts of the service are already running or not.
Rovanion committed
140 141 142 143 144 145 146
check_status(){
  check_pids
  # If the web server is running kill -0 $wpid returns true, or rather 0.
  # Checks of *_status should only check for == 0 or != 0, never anything else.
  if [ $wpid -ne 0 ]; then
    kill -0 "$wpid" 2>/dev/null
    web_status="$?"
147 148
  else
    web_status="-1"
Rovanion committed
149 150 151 152
  fi
  if [ $spid -ne 0 ]; then
    kill -0 "$spid" 2>/dev/null
    sidekiq_status="$?"
153 154
  else
    sidekiq_status="-1"
Rovanion committed
155
  fi
156 157
  if [ $hpid -ne 0 ]; then
    kill -0 "$hpid" 2>/dev/null
158
    gitlab_workhorse_status="$?"
159
  else
160
    gitlab_workhorse_status="-1"
161
  fi
162 163 164 165 166 167 168
  if [ "$mail_room_enabled" = true ]; then
    if [ $mpid -ne 0 ]; then
      kill -0 "$mpid" 2>/dev/null
      mail_room_status="$?"
    else
      mail_room_status="-1"
    fi
Douwe Maan committed
169
  fi
170 171 172 173 174 175 176 177
  if [ "$gitlab_pages_enabled" = true ]; then
    if [ $gppid -ne 0 ]; then
      kill -0 "$gppid" 2>/dev/null
      gitlab_pages_status="$?"
    else
      gitlab_pages_status="-1"
    fi
  fi
178 179 180 181 182 183 184 185 186
  if [ "$gitaly_enabled" = true ]; then
    if [ $gapid -ne 0 ]; then
      kill -0 "$gapid" 2>/dev/null
      gitaly_status="$?"
    else
      gitaly_status="-1"
    fi
  fi
  if [ $web_status = 0 ] && [ $sidekiq_status = 0 ] && [ $gitlab_workhorse_status = 0 ] && { [ "$mail_room_enabled" != true ] || [ $mail_room_status = 0 ]; } && { [ "$gitlab_pages_enabled" != true ] || [ $gitlab_pages_status = 0 ]; } && { [ "$gitaly_enabled" != true ] || [ $gitaly_status = 0 ]; }; then
187 188 189 190 191 192
    gitlab_status=0
  else
    # http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
    # code 3 means 'program is not running'
    gitlab_status=3
  fi
rezigned committed
193 194
}

195
## Check for stale pids and remove them if necessary.
Rovanion committed
196 197 198 199
check_stale_pids(){
  check_status
  # If there is a pid it is something else than 0, the service is running if
  # *_status is == 0.
200
  if [ "$wpid" != "0" ] && [ "$web_status" != "0" ]; then
201 202
    echo "Removing stale Unicorn web server pid. This is most likely caused by the web server crashing the last time it ran."
    if ! rm "$web_server_pid_path"; then
203
      echo "Unable to remove stale pid, exiting."
204 205
      exit 1
    fi
Rovanion committed
206
  fi
207
  if [ "$spid" != "0" ] && [ "$sidekiq_status" != "0" ]; then
208
    echo "Removing stale Sidekiq job dispatcher pid. This is most likely caused by Sidekiq crashing the last time it ran."
209 210 211 212
    if ! rm "$sidekiq_pid_path"; then
      echo "Unable to remove stale pid, exiting"
      exit 1
    fi
Rovanion committed
213
  fi
214
  if [ "$hpid" != "0" ] && [ "$gitlab_workhorse_status" != "0" ]; then
215
    echo "Removing stale GitLab Workhorse pid. This is most likely caused by GitLab Workhorse crashing the last time it ran."
216
    if ! rm "$gitlab_workhorse_pid_path"; then
217 218 219 220
      echo "Unable to remove stale pid, exiting"
      exit 1
    fi
  fi
221
  if [ "$mail_room_enabled" = true ] && [ "$mpid" != "0" ] && [ "$mail_room_status" != "0" ]; then
Douwe Maan committed
222 223 224 225 226 227
    echo "Removing stale MailRoom job dispatcher pid. This is most likely caused by MailRoom crashing the last time it ran."
    if ! rm "$mail_room_pid_path"; then
      echo "Unable to remove stale pid, exiting"
      exit 1
    fi
  fi
228 229 230 231 232 233 234
  if [ "$gitlab_pages_enabled" = true ] && [ "$gppid" != "0" ] && [ "$gitlab_pages_status" != "0" ]; then
    echo "Removing stale GitLab Pages job dispatcher pid. This is most likely caused by GitLab Pages crashing the last time it ran."
    if ! rm "$gitlab_pages_pid_path"; then
      echo "Unable to remove stale pid, exiting"
      exit 1
    fi
  fi
235 236 237 238 239 240 241
  if [ "$gitaly_enabled" = true ] && [ "$gapid" != "0" ] && [ "$gitaly_status" != "0" ]; then
    echo "Removing stale Gitaly pid. This is most likely caused by Gitaly crashing the last time it ran."
    if ! rm "$gitaly_pid_path"; then
      echo "Unable to remove stale pid, exiting"
      exit 1
    fi
  fi
Rovanion committed
242 243
}

244
## If no parts of the service is running, bail out.
245
exit_if_not_running(){
Rovanion committed
246
  check_stale_pids
247
  if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; } && { [ "$gitlab_pages_enabled" != true ] || [ "$gitlab_pages_status" != "0" ]; } && { [ "$gitaly_enabled" != true ] || [ "$gitaly_status" != "0" ]; }; then
Rovanion committed
248 249 250 251 252
    echo "GitLab is not running."
    exit
  fi
}

253
## Starts Unicorn and Sidekiq if they're not running.
254
start_gitlab() {
Rovanion committed
255 256
  check_stale_pids

Douwe Maan committed
257
  if [ "$web_status" != "0" ]; then
Douwe Maan committed
258
    echo "Starting GitLab Unicorn"
Douwe Maan committed
259 260
  fi
  if [ "$sidekiq_status" != "0" ]; then
Douwe Maan committed
261
    echo "Starting GitLab Sidekiq"
262
  fi
263
  if [ "$gitlab_workhorse_status" != "0" ]; then
264
    echo "Starting GitLab Workhorse"
265
  fi
266
  if [ "$mail_room_enabled" = true ] && [ "$mail_room_status" != "0" ]; then
Douwe Maan committed
267
    echo "Starting GitLab MailRoom"
Douwe Maan committed
268
  fi
269
  if [ "$gitlab_pages_enabled" = true ] && [ "$gitlab_pages_status" != "0" ]; then
270 271
    echo "Starting GitLab Pages"
  fi
272 273 274
  if [ "$gitaly_enabled" = true ] && [ "$gitaly_status" != "0" ]; then
    echo "Starting Gitaly"
  fi
275

Rovanion committed
276 277 278
  # Then check if the service is running. If it is: don't start again.
  if [ "$web_status" = "0" ]; then
    echo "The Unicorn web server already running with pid $wpid, not restarting."
279
  else
Rovanion committed
280
    # Remove old socket if it exists
fbretel committed
281
    rm -f "$rails_socket" 2>/dev/null
282
    # Start the web server
283
    RAILS_ENV=$RAILS_ENV bin/web start
284 285
  fi

Rovanion committed
286 287 288
  # If sidekiq is already running, don't start it again.
  if [ "$sidekiq_status" = "0" ]; then
    echo "The Sidekiq job dispatcher is already running with pid $spid, not restarting"
289
  else
290
    RAILS_ENV=$RAILS_ENV bin/background_jobs start &
291
  fi
Rovanion committed
292

293
  if [ "$gitlab_workhorse_status" = "0" ]; then
Semen Romanov committed
294
    echo "The GitLab Workhorse is already running with pid $hpid, not restarting"
295
  else
296 297 298
    # No need to remove a socket, gitlab-workhorse does this itself.
    # Because gitlab-workhorse has multiple executables we need to fix
    # the PATH.
299
    $app_root/bin/daemon_with_pidfile $gitlab_workhorse_pid_path  \
300 301
      /usr/bin/env PATH=$gitlab_workhorse_dir:$PATH \
        gitlab-workhorse $gitlab_workhorse_options \
302
      >> $gitlab_workhorse_log 2>&1 &
303 304
  fi

Douwe Maan committed
305 306 307
  if [ "$mail_room_enabled" = true ]; then
    # If MailRoom is already running, don't start it again.
    if [ "$mail_room_status" = "0" ]; then
308
      echo "The MailRoom email processor is already running with pid $mpid, not restarting"
Douwe Maan committed
309 310 311 312 313
    else
      RAILS_ENV=$RAILS_ENV bin/mail_room start &
    fi
  fi

314 315
  if [ "$gitlab_pages_enabled" = true ]; then
    if [ "$gitlab_pages_status" = "0" ]; then
Semen Romanov committed
316
      echo "The GitLab Pages is already running with pid $gppid, not restarting"
317 318 319 320 321 322 323
    else
      $app_root/bin/daemon_with_pidfile $gitlab_pages_pid_path  \
          $gitlab_pages_dir/gitlab-pages $gitlab_pages_options \
        >> $gitlab_pages_log 2>&1 &
    fi
  fi

324 325 326 327 328
  if [ "$gitaly_enabled" = true ]; then
    if [ "$gitaly_status" = "0" ]; then
      echo "Gitaly is already running with pid $gapid, not restarting"
    else
      $app_root/bin/daemon_with_pidfile $gitaly_pid_path \
329
          $gitaly_dir/gitaly $gitaly_dir/config.toml >> $gitaly_log 2>&1 &
330 331 332
    fi
  fi

333 334
  # Wait for the pids to be planted
  wait_for_pids
Rovanion committed
335
  # Finally check the status to tell wether or not GitLab is running
336
  print_status
337 338
}

Douwe Maan committed
339
## Asks Unicorn, Sidekiq and MailRoom if they would be so kind as to stop, if not kills them.
340
stop_gitlab() {
341
  exit_if_not_running
342

Douwe Maan committed
343
  if [ "$web_status" = "0" ]; then
Douwe Maan committed
344
    echo "Shutting down GitLab Unicorn"
345
    RAILS_ENV=$RAILS_ENV bin/web stop
Douwe Maan committed
346 347
  fi
  if [ "$sidekiq_status" = "0" ]; then
Douwe Maan committed
348
    echo "Shutting down GitLab Sidekiq"
349
    RAILS_ENV=$RAILS_ENV bin/background_jobs stop
350
  fi
351
  if [ "$gitlab_workhorse_status" = "0" ]; then
352
    echo "Shutting down GitLab Workhorse"
353
    kill -- $(cat $gitlab_workhorse_pid_path)
354
  fi
355
  if [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; then
356
    echo "Shutting down GitLab MailRoom"
Douwe Maan committed
357 358
    RAILS_ENV=$RAILS_ENV bin/mail_room stop
  fi
359 360 361 362
  if [ "$gitlab_pages_status" = "0" ]; then
    echo "Shutting down gitlab-pages"
    kill -- $(cat $gitlab_pages_pid_path)
  fi
363 364 365 366
  if [ "$gitaly_status" = "0" ]; then
    echo "Shutting down Gitaly"
    kill -- $(cat $gitaly_pid_path)
  fi
Rovanion committed
367 368

  # If something needs to be stopped, lets wait for it to stop. Never use SIGKILL in a script.
369
  while [ "$web_status" = "0" ] || [ "$sidekiq_status" = "0" ] || [ "$gitlab_workhorse_status" = "0" ] || { [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; } || { [ "$gitlab_pages_enabled" = true ] && [ "$gitlab_pages_status" = "0" ]; } || { [ "$gitaly_enabled" = true ] && [ "$gitaly_status" = "0" ]; }; do
Rovanion committed
370 371
    sleep 1
    check_status
372
    printf "."
373
    if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; } && { [ "$gitlab_pages_enabled" != true ] || [ "$gitlab_pages_status" != "0" ]; } && { [ "$gitaly_enabled" != true ] || [ "$gitaly_status" != "0" ]; }; then
Rovanion committed
374 375 376 377
      printf "\n"
      break
    fi
  done
378

Rovanion committed
379 380 381
  sleep 1
  # Cleaning up unused pids
  rm "$web_server_pid_path" 2>/dev/null
382
  # rm "$sidekiq_pid_path" 2>/dev/null # Sidekiq seems to be cleaning up its own pid.
383
  rm -f "$gitlab_workhorse_pid_path"
Douwe Maan committed
384 385 386
  if [ "$mail_room_enabled" = true ]; then
    rm "$mail_room_pid_path" 2>/dev/null
  fi
387
  rm -f "$gitlab_pages_pid_path"
388
  rm -f "$gitaly_pid_path"
Rovanion committed
389

390
  print_status
391 392
}

393
## Prints the status of GitLab and its components.
394
print_status() {
395
  check_status
396
  if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; } && { [ "$gitlab_pages_enabled" != true ] || [ "$gitlab_pages_status" != "0" ]; } && { [ "$gitaly_enabled" != true ] || [ "$gitaly_status" != "0" ]; }; then
397 398 399
    echo "GitLab is not running."
    return
  fi
Rovanion committed
400
  if [ "$web_status" = "0" ]; then
401
      echo "The GitLab Unicorn web server with pid $wpid is running."
402
  else
403
      printf "The GitLab Unicorn web server is \033[31mnot running\033[0m.\n"
Rovanion committed
404 405 406 407 408 409
  fi
  if [ "$sidekiq_status" = "0" ]; then
      echo "The GitLab Sidekiq job dispatcher with pid $spid is running."
  else
      printf "The GitLab Sidekiq job dispatcher is \033[31mnot running\033[0m.\n"
  fi
410
  if [ "$gitlab_workhorse_status" = "0" ]; then
411
      echo "The GitLab Workhorse with pid $hpid is running."
412
  else
413
      printf "The GitLab Workhorse is \033[31mnot running\033[0m.\n"
414
  fi
Douwe Maan committed
415 416
  if [ "$mail_room_enabled" = true ]; then
    if [ "$mail_room_status" = "0" ]; then
417
        echo "The GitLab MailRoom email processor with pid $mpid is running."
Douwe Maan committed
418 419 420
    else
        printf "The GitLab MailRoom email processor is \033[31mnot running\033[0m.\n"
    fi
Douwe Maan committed
421
  fi
422 423
  if [ "$gitlab_pages_enabled" = true ]; then
    if [ "$gitlab_pages_status" = "0" ]; then
Semen Romanov committed
424
        echo "The GitLab Pages with pid $gppid is running."
425 426 427 428
    else
        printf "The GitLab Pages is \033[31mnot running\033[0m.\n"
    fi
  fi
429 430 431 432 433 434 435 436
  if [ "$gitaly_enabled" = true ]; then
    if [ "$gitaly_status" = "0" ]; then
        echo "Gitaly with pid $gapid is running."
    else
        printf "Gitaly is \033[31mnot running\033[0m.\n"
    fi
  fi
  if [ "$web_status" = "0" ] && [ "$sidekiq_status" = "0" ] && [ "$gitlab_workhorse_status" = "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" = "0" ]; } && { [ "$gitlab_pages_enabled" != true ] || [ "$gitlab_pages_status" = "0" ]; } && { [ "$gitaly_enabled" != true ] || [ "$gitaly_status" = "0" ]; }; then
437
    printf "GitLab and all its components are \033[32mup and running\033[0m.\n"
438 439 440
  fi
}

441
## Tells unicorn to reload its config and Sidekiq to restart
442
reload_gitlab(){
443
  exit_if_not_running
Rovanion committed
444
  if [ "$wpid" = "0" ];then
445
    echo "The GitLab Unicorn Web server is not running thus its configuration can't be reloaded."
446
    exit 1
Rovanion committed
447
  fi
448
  printf "Reloading GitLab Unicorn configuration... "
449
  RAILS_ENV=$RAILS_ENV bin/web reload
Rovanion committed
450
  echo "Done."
Douwe Maan committed
451

452
  echo "Restarting GitLab Sidekiq since it isn't capable of reloading its config..."
453
  RAILS_ENV=$RAILS_ENV bin/background_jobs restart
454

Douwe Maan committed
455 456 457 458 459
  if [ "$mail_room_enabled" != true ]; then
    echo "Restarting GitLab MailRoom since it isn't capable of reloading its config..."
    RAILS_ENV=$RAILS_ENV bin/mail_room restart
  fi

460 461
  wait_for_pids
  print_status
Rovanion committed
462 463
}

464
## Restarts Sidekiq and Unicorn.
465
restart_gitlab(){
466
  check_status
467
  if [ "$web_status" = "0" ] || [ "$sidekiq_status" = "0" ] || [ "$gitlab_workhorse" = "0" ] || { [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; } || { [ "$gitlab_pages_enabled" = true ] && [ "$gitlab_pages_status" = "0" ]; } || { [ "$gitaly_enabled" = true ] && [ "$gitaly_status" = "0" ]; }; then
468
    stop_gitlab
469
  fi
470
  start_gitlab
471 472
}

Rovanion committed
473

474
### Finally the input handling.
475 476 477

case "$1" in
  start)
478
        start_gitlab
479 480
        ;;
  stop)
481
        stop_gitlab
482 483
        ;;
  restart)
484
        restart_gitlab
485 486
        ;;
  reload|force-reload)
487
	reload_gitlab
488 489
        ;;
  status)
490
        print_status
491
        exit $gitlab_status
492 493
        ;;
  *)
Rovanion committed
494
        echo "Usage: service gitlab {start|stop|restart|reload|status}"
495 496 497 498
        exit 1
        ;;
esac

499
exit