chiliproj/rc.chiliproj

changeset 764
b3f4be54aeb4
child 765
5be956b2db74
equal deleted inserted replaced
-1:000000000000 0:6e8fc6537523
1 #! @l_prefix@/bin/openpkg rc
2 ##
3 ## rc.chiliproj -- Run-Commands
4 ##
5
6 %config
7 chili_enable="$openpkg_rc_def"
8 chili_host="localhost"
9 chili_log_prolog="true"
10 chili_log_epilog="true"
11 chili_log_numfiles="10"
12 chili_log_minsize="1M"
13 chili_log_complevel="9"
14
15 %status -u @l_susr@ -o
16 chili_usable="unknown"
17 #chili_active="no"
18 chili_active="unknown"
19 # rcService chiliproj enable yes && \
20 # check pid or something >/dev/null 2>&1 && \
21 # chili_active="yes"
22 echo "chili_enable=\"$chili_enable\""
23 echo "chili_usable=\"$chili_usable\""
24 echo "chili_active=\"$chili_active\""
25
26 %start -u @l_nusr@
27 rcService chiliproj enable yes || exit 0
28 rcService chiliproj active yes && exit 0
29 PATH=$PATH:@l_gempath@/bin bundle exec thin -e production -a $chili_host start
30
31 %stop -u @l_nusr@
32 rcService chiliproj enable yes || exit 0
33 rcService chiliproj active no && exit 0
34 # send kill -TERM to pid
35
36 %restart -u @l_nusr@
37 rcService chiliproj enable yes || exit 0
38 rcService chiliproj active no && exit 0
39 # do stop sleep start
40
41 %daily -u @l_nusr@
42 rcService chiliproj enable yes || exit 0
43 # shtool rotate -f \
44 # -n ${chili_log_numfiles} -s ${chili_log_minsize} -d \
45 # -z ${chili_log_complevel} -m 664 -o @l_rusr@ -g @l_rgrp@ \
46 # -P "${chili_log_prolog}" \
47 # -E "${chili_log_epilog}; rc chiliproj logrel" \
48 # @l_prefix@/lib/chiliproj/log/chiliproject.log
49

mercurial