diff -r 55a8b8e82e56 -r 75275e2bcfd7 roundcube/rc.roundcube --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roundcube/rc.roundcube Thu Oct 18 12:53:06 2012 +0200 @@ -0,0 +1,53 @@ +#!@l_prefix@/bin/openpkg rc +## +## rc.roundcube -- Run-Commands +## + +%config + roundcube_enable="$openpkg_rc_def" + roundcube_log_prolog="true" + roundcube_log_epilog="true" + roundcube_log_numfiles="10" + roundcube_log_minsize="1M" + roundcube_log_complevel="9" + +%status -u @l_susr@ -o + roundcube_usable="no" + roundcube_active="no" + @l_prefix@/sbin/apache -t \ + -f @l_prefix@/etc/roundcube/roundcube-apache.conf 2>/dev/null && \ + roundcube_usable="yes" + [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ + kill -0 `cat @l_prefix@/var/roundcube/run/apache.pid` && \ + roundcube_active="yes" + echo "roundcube_enable=\"$roundcube_enable\"" + echo "roundcube_usable=\"$roundcube_usable\"" + echo "roundcube_active=\"$roundcube_active\"" + +%start -u @l_susr@ + rcService roundcube enable yes || exit 0 + rcService roundcube active yes && exit 0 + @l_prefix@/sbin/apache \ + -f @l_prefix@/etc/roundcube/roundcube-apache.conf + +%stop -u @l_susr@ + rcService roundcube enable yes || exit 0 + rcService roundcube active no && exit 0 + [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ + kill -TERM `cat @l_prefix@/var/roundcube/run/apache.pid` + sleep 2 + +%restart -u @l_susr@ + rcService roundcube enable yes || exit 0 + rcService roundcube active no && exit 0 + rc roundcube stop start + +%daily -u @l_nusr@ + rcService roundcube enable yes || exit 0 + shtool rotate -f \ + -n ${roundcube_log_numfiles} -s ${roundcube_log_minsize} -d \ + -z ${roundcube_log_complevel} -m 644 -o @l_nusr@ -g @l_ngrp@ \ + -P "${roundcube_log_prolog}" \ + -E "${roundcube_log_epilog}" \ + @l_prefix@/share/roundcube/logs/errors +