1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/chiliproj/rc.chiliproj Sun Mar 31 17:55:10 2013 +0200 1.3 @@ -0,0 +1,49 @@ 1.4 +#! @l_prefix@/bin/openpkg rc 1.5 +## 1.6 +## rc.chiliproj -- Run-Commands 1.7 +## 1.8 + 1.9 +%config 1.10 + chili_enable="$openpkg_rc_def" 1.11 + chili_host="localhost" 1.12 + chili_log_prolog="true" 1.13 + chili_log_epilog="true" 1.14 + chili_log_numfiles="10" 1.15 + chili_log_minsize="1M" 1.16 + chili_log_complevel="9" 1.17 + 1.18 +%status -u @l_susr@ -o 1.19 + chili_usable="unknown" 1.20 + #chili_active="no" 1.21 + chili_active="unknown" 1.22 + # rcService chiliproj enable yes && \ 1.23 + # check pid or something >/dev/null 2>&1 && \ 1.24 + # chili_active="yes" 1.25 + echo "chili_enable=\"$chili_enable\"" 1.26 + echo "chili_usable=\"$chili_usable\"" 1.27 + echo "chili_active=\"$chili_active\"" 1.28 + 1.29 +%start -u @l_nusr@ 1.30 + rcService chiliproj enable yes || exit 0 1.31 + rcService chiliproj active yes && exit 0 1.32 + PATH=$PATH:@l_gempath@/bin bundle exec thin -e production -a $chili_host start 1.33 + 1.34 +%stop -u @l_nusr@ 1.35 + rcService chiliproj enable yes || exit 0 1.36 + rcService chiliproj active no && exit 0 1.37 + # send kill -TERM to pid 1.38 + 1.39 +%restart -u @l_nusr@ 1.40 + rcService chiliproj enable yes || exit 0 1.41 + rcService chiliproj active no && exit 0 1.42 + # do stop sleep start 1.43 + 1.44 +%daily -u @l_nusr@ 1.45 + rcService chiliproj enable yes || exit 0 1.46 +# shtool rotate -f \ 1.47 +# -n ${chili_log_numfiles} -s ${chili_log_minsize} -d \ 1.48 +# -z ${chili_log_complevel} -m 664 -o @l_rusr@ -g @l_rgrp@ \ 1.49 +# -P "${chili_log_prolog}" \ 1.50 +# -E "${chili_log_epilog}; rc chiliproj logrel" \ 1.51 +# @l_prefix@/lib/chiliproj/log/chiliproject.log 1.52 +