asterisk/rc.asterisk

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 386
d355cb4bbdab
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

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

mercurial