summaryrefslogtreecommitdiff
path: root/contrib/init.d/rc.suse.asterisk
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-01-11 23:00:55 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-01-11 23:00:55 +0000
commit38957995ff3f794a993063febf5c46eb907b87aa (patch)
tree8cbac595cfb96c97b174864fedaf1b8a3e6b44f2 /contrib/init.d/rc.suse.asterisk
parentd079b371c70988de0e3f2b61e0cb7282b83ff4b1 (diff)
Permit more options in the Makefile as to startup options
(closes issue #16454) Reported by: syspert Patches: 20091228__issue16454__3.diff.txt uploaded by tilghman (license 14) Tested by: syspert git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@239231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib/init.d/rc.suse.asterisk')
-rwxr-xr-xcontrib/init.d/rc.suse.asterisk39
1 files changed, 38 insertions, 1 deletions
diff --git a/contrib/init.d/rc.suse.asterisk b/contrib/init.d/rc.suse.asterisk
index 54b67207a..e4976bb61 100755
--- a/contrib/init.d/rc.suse.asterisk
+++ b/contrib/init.d/rc.suse.asterisk
@@ -59,6 +59,15 @@ SAFE_ASTERISK=/usr/sbin/safe_asterisk
#AST_USER="asterisk"
#AST_GROUP="asterisk"
+# Allow configuration overrides in /etc/sysconfig/asterisk
+CONFIG0=`readlink $0`
+if [ "$CONFIG0" = "" ]; then
+ CONFIGFILE=/etc/sysconfig/`basename $0`
+else
+ CONFIGFILE=/etc/sysconfig/`basename $CONFIG0`
+fi
+[ -r $CONFIGFILE ] && . $CONFIGFILE
+
RETVAL=0
start() {
@@ -82,7 +91,35 @@ start() {
if [ $AST_GROUP ] ; then
ASTARGS="`echo $ASTARGS` -G $AST_GROUP"
fi
- $DAEMON $ASTARGS
+ if [ $ALTCONF ]; then
+ ASTARGS="$ASTARGS -C $ALTCONF"
+ fi
+ if [ "x$COREDUMP" = "xyes" ]; then
+ ASTARGS="$ASTARGS -g"
+ fi
+ if [ "0$MAXLOAD" -gt "0" ]; then
+ ASTARGS="$ASTARGS -L $MAXLOAD"
+ fi
+ if [ "0$MAXCALLS" -gt "0" ]; then
+ ASTARGS="$ASTARGS -M $MAXCALLS"
+ fi
+ if [ "$VERBOSITY" -gt "0" ]; then
+ for i in `seq 1 $VERBOSITY`; do
+ ASTARGS="$ASTARGS -v"
+ done
+ fi
+ if [ "x$INTERNALTIMING" = "xyes" ]; then
+ ASTARGS="$ASTARGS -I"
+ fi
+ if [ "x$TEMPRECORDINGLOCATION" = "xyes" -o "x$TMPRECORDINGLOCATION" = "xyes" ]; then
+ ASTARGS="$ASTARGS -t"
+ fi
+ if [ "x$COLOR" = "xyes" ]; then
+ export TERM=linux
+ sh -c "$DAEMON $ASTARGS -c" >/dev/null </dev/null 2>&1 &
+ else
+ $DAEMON $ASTARGS
+ fi
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/asterisk
echo