michael@746: #!@l_prefix@/bin/openpkg rc michael@746: ## michael@746: ## rc.roundcube -- Run-Commands michael@746: ## michael@746: michael@746: %config michael@746: roundcube_enable="$openpkg_rc_def" michael@746: roundcube_log_prolog="true" michael@746: roundcube_log_epilog="true" michael@746: roundcube_log_numfiles="10" michael@746: roundcube_log_minsize="1M" michael@746: roundcube_log_complevel="9" michael@746: michael@746: %status -u @l_susr@ -o michael@746: roundcube_usable="no" michael@746: roundcube_active="no" michael@746: @l_prefix@/sbin/apache -t \ michael@746: -f @l_prefix@/etc/roundcube/roundcube-apache.conf 2>/dev/null && \ michael@746: roundcube_usable="yes" michael@746: [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ michael@746: kill -0 `cat @l_prefix@/var/roundcube/run/apache.pid` && \ michael@746: roundcube_active="yes" michael@746: echo "roundcube_enable=\"$roundcube_enable\"" michael@746: echo "roundcube_usable=\"$roundcube_usable\"" michael@746: echo "roundcube_active=\"$roundcube_active\"" michael@746: michael@746: %start -u @l_susr@ michael@746: rcService roundcube enable yes || exit 0 michael@746: rcService roundcube active yes && exit 0 michael@746: @l_prefix@/sbin/apache \ michael@746: -f @l_prefix@/etc/roundcube/roundcube-apache.conf michael@746: michael@746: %stop -u @l_susr@ michael@746: rcService roundcube enable yes || exit 0 michael@746: rcService roundcube active no && exit 0 michael@746: [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ michael@746: kill -TERM `cat @l_prefix@/var/roundcube/run/apache.pid` michael@746: sleep 2 michael@746: michael@746: %restart -u @l_susr@ michael@746: rcService roundcube enable yes || exit 0 michael@746: rcService roundcube active no && exit 0 michael@746: rc roundcube stop start michael@746: michael@746: %daily -u @l_nusr@ michael@746: rcService roundcube enable yes || exit 0 michael@746: shtool rotate -f \ michael@746: -n ${roundcube_log_numfiles} -s ${roundcube_log_minsize} -d \ michael@746: -z ${roundcube_log_complevel} -m 644 -o @l_nusr@ -g @l_ngrp@ \ michael@746: -P "${roundcube_log_prolog}" \ michael@746: -E "${roundcube_log_epilog}" \ michael@746: @l_prefix@/share/roundcube/logs/errors michael@746: