|
1 #!@l_prefix@/bin/openpkg rc |
|
2 ## |
|
3 ## rc.roundcube -- Run-Commands |
|
4 ## |
|
5 |
|
6 %config |
|
7 roundcube_enable="$openpkg_rc_def" |
|
8 roundcube_log_prolog="true" |
|
9 roundcube_log_epilog="true" |
|
10 roundcube_log_numfiles="10" |
|
11 roundcube_log_minsize="1M" |
|
12 roundcube_log_complevel="9" |
|
13 |
|
14 %status -u @l_susr@ -o |
|
15 roundcube_usable="no" |
|
16 roundcube_active="no" |
|
17 @l_prefix@/sbin/apache -t \ |
|
18 -f @l_prefix@/etc/roundcube/roundcube-apache.conf 2>/dev/null && \ |
|
19 roundcube_usable="yes" |
|
20 [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ |
|
21 kill -0 `cat @l_prefix@/var/roundcube/run/apache.pid` && \ |
|
22 roundcube_active="yes" |
|
23 echo "roundcube_enable=\"$roundcube_enable\"" |
|
24 echo "roundcube_usable=\"$roundcube_usable\"" |
|
25 echo "roundcube_active=\"$roundcube_active\"" |
|
26 |
|
27 %start -u @l_susr@ |
|
28 rcService roundcube enable yes || exit 0 |
|
29 rcService roundcube active yes && exit 0 |
|
30 @l_prefix@/sbin/apache \ |
|
31 -f @l_prefix@/etc/roundcube/roundcube-apache.conf |
|
32 |
|
33 %stop -u @l_susr@ |
|
34 rcService roundcube enable yes || exit 0 |
|
35 rcService roundcube active no && exit 0 |
|
36 [ -f @l_prefix@/var/roundcube/run/apache.pid ] && \ |
|
37 kill -TERM `cat @l_prefix@/var/roundcube/run/apache.pid` |
|
38 sleep 2 |
|
39 |
|
40 %restart -u @l_susr@ |
|
41 rcService roundcube enable yes || exit 0 |
|
42 rcService roundcube active no && exit 0 |
|
43 rc roundcube stop start |
|
44 |
|
45 %daily -u @l_nusr@ |
|
46 rcService roundcube enable yes || exit 0 |
|
47 shtool rotate -f \ |
|
48 -n ${roundcube_log_numfiles} -s ${roundcube_log_minsize} -d \ |
|
49 -z ${roundcube_log_complevel} -m 644 -o @l_nusr@ -g @l_ngrp@ \ |
|
50 -P "${roundcube_log_prolog}" \ |
|
51 -E "${roundcube_log_epilog}" \ |
|
52 @l_prefix@/share/roundcube/logs/errors |
|
53 |