Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.davical -- Run-Commands
4 ##
6 %config
7 davical_enable="$openpkg_rc_def"
9 %status -u @l_susr@ -o
10 davical_usable="no"
11 davical_active="no"
12 @l_prefix@/sbin/apache -t \
13 -f @l_prefix@/etc/davical/davical-apache.conf 2>/dev/null && \
14 davical_usable="yes"
15 [ -f @l_prefix@/var/davical/run/apache.pid ] && \
16 kill -0 `cat @l_prefix@/var/davical/run/apache.pid` && \
17 davical_active="yes"
18 echo "davical_enable=\"$davical_enable\""
19 echo "davical_usable=\"$davical_usable\""
20 echo "davical_active=\"$davical_active\""
22 %start -u @l_susr@
23 rcService davical enable yes || exit 0
24 rcService davical active yes && exit 0
25 @l_prefix@/sbin/apache @with_ssl@ \
26 -f @l_prefix@/etc/davical/davical-apache.conf
28 %stop -u @l_susr@
29 rcService davical enable yes || exit 0
30 rcService davical active no && exit 0
31 [ -f @l_prefix@/var/davical/run/apache.pid ] && \
32 kill -TERM `cat @l_prefix@/var/davical/run/apache.pid`
33 sleep 2
35 %restart -u @l_susr@
36 rcService davical enable yes || exit 0
37 rcService davical active no && exit 0
38 rc davical stop start