-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathservicectl
More file actions
executable file
·44 lines (41 loc) · 824 Bytes
/
servicectl
File metadata and controls
executable file
·44 lines (41 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# set ruby GC parameters
RUBY_HEAP_MIN_SLOTS=600000
RUBY_FREE_MIN=200000
RUBY_GC_MALLOC_LIMIT=60000000
export RUBY_HEAP_MIN_SLOTS RUBY_FREE_MIN RUBY_GC_MALLOC_LIMIT
pid="log/rainbows.pid"
case "$1" in
start)
bundle exec rainbows -c config/rainbows.rb -E production -D
;;
stop)
kill -QUIT `cat $pid`
;;
restart)
$0 stop
sleep 1
$0 start
;;
reload)
kill -USR2 `cat $pid`
;;
force-stop)
kill -INT `cat $pid`
;;
shutdown-workers)
kill -WINCH `cat $pid`
;;
increment-worker)
kill -TTIN `cat $pid`
;;
decrement-worker)
kill -TTOU `cat $pid`
;;
logrotate)
kill -USR1 `cat $pid`
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|force-stop|shutdown-workers|increment-worker|decrement-worker|logrotate|}"
;;
esac