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