summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-19 14:27:47 -0700
committerDouwe Maan <douwe@gitlab.com>2015-08-19 14:27:47 -0700
commitc50e5e68c7d4863c26700ced7ea31a18ddfc1c66 (patch)
treedec1fed91482eef4895cca030e5520027c233488
parent34026c97b4d55026c414e839af926af3ffeb31cc (diff)
downloadgitlab-ce-c50e5e68c7d4863c26700ced7ea31a18ddfc1c66.tar.gz
Fix bin/mail_room.
-rwxr-xr-xbin/mail_room17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/mail_room b/bin/mail_room
index 0fabfa778b7..f4f1a170c04 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -4,6 +4,7 @@ cd $(dirname $0)/..
app_root=$(pwd)
mail_room_pidfile="$app_root/tmp/pids/mail_room.pid"
+mail_room_logfile="$app_root/log/mail_room.log"
mail_room_config="$app_root/config/mail_room.yml"
get_mail_room_pid()
@@ -18,7 +19,7 @@ get_mail_room_pid()
start()
{
- bundle exec mail_room -q -c $mail_room_config
+ bundle exec mail_room -q -c $mail_room_config >> $mail_room_logfile 2>&1 &
PID=$!
echo $PID > $mail_room_pidfile
}
@@ -26,13 +27,13 @@ start()
stop()
{
get_mail_room_pid
- kill -QUIT $mail_room_pid
+ kill -TERM $mail_room_pid
}
-reload()
+restart()
{
- get_mail_room_pid
- kill -USR2 $mail_room_pid
+ stop
+ start
}
case "$1" in
@@ -42,10 +43,10 @@ case "$1" in
stop)
stop
;;
- reload)
- reload
+ restart)
+ restart
;;
*)
- echo "Usage: $0 {start|stop|reload}"
+ echo "Usage: $0 {start|stop|restart}"
;;
esac