diff -r d07f45deec02 -r b3f4be54aeb4 chiliproj/rc.chiliproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chiliproj/rc.chiliproj Sun Mar 31 17:55:10 2013 +0200 @@ -0,0 +1,49 @@ +#! @l_prefix@/bin/openpkg rc +## +## rc.chiliproj -- Run-Commands +## + +%config + chili_enable="$openpkg_rc_def" + chili_host="localhost" + chili_log_prolog="true" + chili_log_epilog="true" + chili_log_numfiles="10" + chili_log_minsize="1M" + chili_log_complevel="9" + +%status -u @l_susr@ -o + chili_usable="unknown" + #chili_active="no" + chili_active="unknown" + # rcService chiliproj enable yes && \ + # check pid or something >/dev/null 2>&1 && \ + # chili_active="yes" + echo "chili_enable=\"$chili_enable\"" + echo "chili_usable=\"$chili_usable\"" + echo "chili_active=\"$chili_active\"" + +%start -u @l_nusr@ + rcService chiliproj enable yes || exit 0 + rcService chiliproj active yes && exit 0 + PATH=$PATH:@l_gempath@/bin bundle exec thin -e production -a $chili_host start + +%stop -u @l_nusr@ + rcService chiliproj enable yes || exit 0 + rcService chiliproj active no && exit 0 + # send kill -TERM to pid + +%restart -u @l_nusr@ + rcService chiliproj enable yes || exit 0 + rcService chiliproj active no && exit 0 + # do stop sleep start + +%daily -u @l_nusr@ + rcService chiliproj enable yes || exit 0 +# shtool rotate -f \ +# -n ${chili_log_numfiles} -s ${chili_log_minsize} -d \ +# -z ${chili_log_complevel} -m 664 -o @l_rusr@ -g @l_rgrp@ \ +# -P "${chili_log_prolog}" \ +# -E "${chili_log_epilog}; rc chiliproj logrel" \ +# @l_prefix@/lib/chiliproj/log/chiliproject.log +