File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ cd $(dirname $0)/..
4
4
app_root=$( pwd)
5
5
6
6
mail_room_pidfile=" $app_root /tmp/pids/mail_room.pid"
7
+ mail_room_logfile=" $app_root /log/mail_room.log"
7
8
mail_room_config=" $app_root /config/mail_room.yml"
8
9
9
10
get_mail_room_pid ()
@@ -18,21 +19,21 @@ get_mail_room_pid()
18
19
19
20
start ()
20
21
{
21
- bundle exec mail_room -q -c $mail_room_config
22
+ bundle exec mail_room -q -c $mail_room_config >> $mail_room_logfile 2>&1 &
22
23
PID=$!
23
24
echo $PID > $mail_room_pidfile
24
25
}
25
26
26
27
stop ()
27
28
{
28
29
get_mail_room_pid
29
- kill -QUIT $mail_room_pid
30
+ kill -TERM $mail_room_pid
30
31
}
31
32
32
- reload ()
33
+ restart ()
33
34
{
34
- get_mail_room_pid
35
- kill -USR2 $mail_room_pid
35
+ stop
36
+ start
36
37
}
37
38
38
39
case " $1 " in
@@ -42,10 +43,10 @@ case "$1" in
42
43
stop)
43
44
stop
44
45
;;
45
- reload )
46
- reload
46
+ restart )
47
+ restart
47
48
;;
48
49
* )
49
- echo " Usage: $0 {start|stop|reload }"
50
+ echo " Usage: $0 {start|stop|restart }"
50
51
;;
51
52
esac
You can’t perform that action at this time.
0 commit comments