1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/roundcube/rc.roundcube Thu Oct 18 12:53:06 2012 +0200 1.3 @@ -0,0 +1,53 @@ 1.4 +#!@l_prefix@/bin/openpkg rc 1.5 +## 1.6 +## rc.roundcube -- Run-Commands 1.7 +## 1.8 + 1.9 +%config 1.10 + roundcube_enable="$openpkg_rc_def" 1.11 + roundcube_log_prolog="true" 1.12 + roundcube_log_epilog="true" 1.13 + roundcube_log_numfiles="10" 1.14 + roundcube_log_minsize="1M" 1.15 + roundcube_log_complevel="9" 1.16 + 1.17 +%status -u @l_susr@ -o 1.18 + roundcube_usable="no" 1.19 + roundcube_active="no" 1.20 + @l_prefix@/sbin/apache -t \ 1.21 + -f @l_prefix@/etc/roundcube/roundcube-apache.conf 2>/dev/null && \ 1.22 + roundcube_usable="yes" 1.23 + [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ 1.24 + kill -0 `cat @l_prefix@/var/roundcube/run/apache.pid` && \ 1.25 + roundcube_active="yes" 1.26 + echo "roundcube_enable=\"$roundcube_enable\"" 1.27 + echo "roundcube_usable=\"$roundcube_usable\"" 1.28 + echo "roundcube_active=\"$roundcube_active\"" 1.29 + 1.30 +%start -u @l_susr@ 1.31 + rcService roundcube enable yes || exit 0 1.32 + rcService roundcube active yes && exit 0 1.33 + @l_prefix@/sbin/apache \ 1.34 + -f @l_prefix@/etc/roundcube/roundcube-apache.conf 1.35 + 1.36 +%stop -u @l_susr@ 1.37 + rcService roundcube enable yes || exit 0 1.38 + rcService roundcube active no && exit 0 1.39 + [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ 1.40 + kill -TERM `cat @l_prefix@/var/roundcube/run/apache.pid` 1.41 + sleep 2 1.42 + 1.43 +%restart -u @l_susr@ 1.44 + rcService roundcube enable yes || exit 0 1.45 + rcService roundcube active no && exit 0 1.46 + rc roundcube stop start 1.47 + 1.48 +%daily -u @l_nusr@ 1.49 + rcService roundcube enable yes || exit 0 1.50 + shtool rotate -f \ 1.51 + -n ${roundcube_log_numfiles} -s ${roundcube_log_minsize} -d \ 1.52 + -z ${roundcube_log_complevel} -m 644 -o @l_nusr@ -g @l_ngrp@ \ 1.53 + -P "${roundcube_log_prolog}" \ 1.54 + -E "${roundcube_log_epilog}" \ 1.55 + @l_prefix@/share/roundcube/logs/errors 1.56 +