joomla/rc.joomla

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

     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

mercurial