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