diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-19 13:58:07 -0700 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-19 13:58:07 -0700 |
commit | f3b57ce677f016fbbbcc6426e33b2b61c34c068f (patch) | |
tree | 6924508fe8db3ca592c6ebb9efcab2d798084bfd /bin | |
parent | 089aa2de2badcb4d6caf2d2001ad17db42d08de8 (diff) | |
download | gitlab-ce-f3b57ce677f016fbbbcc6426e33b2b61c34c068f.tar.gz |
Update init scripts.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/background_jobs | 2 | ||||
-rwxr-xr-x | bin/mail_room | 51 |
2 files changed, 52 insertions, 1 deletions
diff --git a/bin/background_jobs b/bin/background_jobs index a041a4b0433..a4895cf6586 100755 --- a/bin/background_jobs +++ b/bin/background_jobs @@ -37,7 +37,7 @@ start_no_deamonize() start_sidekiq() { - bundle exec sidekiq -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e $RAILS_ENV -P $sidekiq_pidfile $@ >> $sidekiq_logfile 2>&1 + bundle exec sidekiq -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q common -q default -e $RAILS_ENV -P $sidekiq_pidfile $@ >> $sidekiq_logfile 2>&1 } load_ok() diff --git a/bin/mail_room b/bin/mail_room new file mode 100755 index 00000000000..0fabfa778b7 --- /dev/null +++ b/bin/mail_room @@ -0,0 +1,51 @@ +#!/bin/sh + +cd $(dirname $0)/.. +app_root=$(pwd) + +mail_room_pidfile="$app_root/tmp/pids/mail_room.pid" +mail_room_config="$app_root/config/mail_room.yml" + +get_mail_room_pid() +{ + local pid=$(cat $mail_room_pidfile) + if [ -z "$pid" ] ; then + echo "Could not find a PID in $mail_room_pidfile" + exit 1 + fi + mail_room_pid=$pid +} + +start() +{ + bundle exec mail_room -q -c $mail_room_config + PID=$! + echo $PID > $mail_room_pidfile +} + +stop() +{ + get_mail_room_pid + kill -QUIT $mail_room_pid +} + +reload() +{ + get_mail_room_pid + kill -USR2 $mail_room_pid +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload) + reload + ;; + *) + echo "Usage: $0 {start|stop|reload}" + ;; +esac |