Sat, 01 Sep 2012 12:17:10 +0200
Back out attempt to repair gets(3) redefinition and correct rather by
avoiding detection of gets(3) as a method with no macro, otherwise
leading to definition of HAVE_RAW_DECL_GETS and redefition of gets(3)
in lib/stdio.h(.in) caused by 'a split double-inclusion guard' and
a seemingly multiple '#include_next <stdio.h>' reference. Quatch.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.joomla -- Run-Commands
4 ##
6 %config
7 joomla_enable="$openpkg_rc_def"
9 %common
10 joomla_cfgfile="@l_prefix@/etc/joomla/joomla-apache.conf"
11 joomla_pidfile="@l_prefix@/var/joomla/run/apache.pid"
12 joomla_signal () {
13 [ -f $joomla_pidfile ] && kill -$1 `cat $joomla_pidfile`
14 }
16 %status -u @l_susr@ -o
17 joomla_usable="no"
18 joomla_active="no"
19 @l_prefix@/sbin/apache -t -f $joomla_cfgfile 2>/dev/null && \
20 joomla_usable="yes"
21 joomla_signal 0 && \
22 joomla_active="yes"
23 echo "joomla_enable=\"$joomla_enable\""
24 echo "joomla_usable=\"$joomla_usable\""
25 echo "joomla_active=\"$joomla_active\""
27 %start -u @l_susr@
28 rcService joomla enable yes || exit 0
29 rcService joomla active yes && exit 0
30 ( export PATH="@l_path@"
31 @l_prefix@/sbin/apache -f $joomla_cfgfile
32 ) || exit $?
34 %stop -u @l_susr@
35 rcService joomla enable yes || exit 0
36 rcService joomla active no && exit 0
37 joomla_signal TERM
38 sleep 2
39 rm -f $joomla_pidfile >/dev/null 2>&1 || true
41 %restart -u @l_susr@
42 rcService joomla enable yes || exit 0
43 rcService joomla active no && exit 0
44 rc joomla stop start