asterisk/rc.asterisk

Tue, 28 Aug 2012 18:28:45 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:28:45 +0200
changeset 528
3b08e6396b45
parent 386
d355cb4bbdab
permissions
-rw-r--r--

Massively update from 5.1 to 5.5 release, completely changing from
autotools to cmake build configuration along with the corresponding
corrections. Correct some less important problems like typical german
english mistakes, as well as use parallel make for faster builds with
SMP and multicore architectures. Warning, the 5.5 releases of MySQL
seem to be equally bug ridden as the 5.1 are, for example building
the NDBCluster storage engine fails.

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.asterisk -- Run-Commands
     4 ##
     6 %config
     7     asterisk_enable="$openpkg_rc_def"
     8     asterisk_nice="-5"
     9     asterisk_flags=""
    10     asterisk_log_prolog="true"
    11     asterisk_log_epilog="true"
    12     asterisk_log_numfiles="10"
    13     asterisk_log_minsize="1M"
    14     asterisk_log_complevel="9"
    16 %status -u @l_susr@ -o
    17     asterisk_usable="unknown"
    18     asterisk_active="no"
    19     rcService asterisk enable yes && \
    20         @l_prefix@/sbin/asterisk -rx "show version" >/dev/null 2>&1 && \
    21         asterisk_active="yes"
    22     echo "asterisk_enable=\"$asterisk_enable\""
    23     echo "asterisk_usable=\"$asterisk_usable\""
    24     echo "asterisk_active=\"$asterisk_active\""
    26 %start -u @l_susr@
    27     rcService asterisk enable yes || exit 0
    28     rcService asterisk active yes && exit 0
    29     nice -n $asterisk_nice @l_prefix@/sbin/asterisk ${asterisk_flags}
    31 %stop -u @l_susr@
    32     rcService asterisk enable yes || exit 0
    33     rcService asterisk active no  && exit 0
    34     ( @l_prefix@/sbin/asterisk -rx "core stop now"
    35     ) >/dev/null 2>&1 || true
    37 %restart -u @l_susr@
    38     rcService asterisk enable yes || exit 0
    39     rcService asterisk active no  && exit 0
    40     @l_prefix@/sbin/asterisk -rx "core restart now"
    42 %reload -u @l_susr@
    43     rcService asterisk enable yes || exit 0
    44     rcService asterisk active no  && exit 0
    45     @l_prefix@/sbin/asterisk -rx "core reload"
    47 %logrel -u @l_susr@
    48     rcService asterisk enable yes || exit 0
    49     rcService asterisk active no  && exit 0
    50     @l_prefix@/sbin/asterisk -rx "logger reload"
    52 %daily -u @l_susr@
    53     rcService asterisk enable yes || exit 0
    54     shtool rotate -f \
    55         -n ${asterisk_log_numfiles} -s ${asterisk_log_minsize} -d \
    56         -z ${asterisk_log_complevel} -m 664 -o @l_rusr@ -g @l_rgrp@ \
    57         -P "${asterisk_log_prolog}" \
    58         -E "${asterisk_log_epilog}; rc asterisk logrel" \
    59         @l_prefix@/var/asterisk/log/asterisk.log

mercurial