diff options
author | Alan Mizrahi <alan+crux@mizrahi.com.ve> | 2013-09-30 22:19:08 +0900 |
---|---|---|
committer | Alan Mizrahi <alan+crux@mizrahi.com.ve> | 2013-09-30 22:19:08 +0900 |
commit | 7927d56910f31990bc585cdf249339600f553f80 (patch) | |
tree | 90cf930e633d019932c0aebb73e137892369a84b /asterisk | |
parent | 1c68556530d8ce3e96c38c22ba0c94a5c09d479a (diff) | |
download | contrib-7927d56910f31990bc585cdf249339600f553f80.tar.gz contrib-7927d56910f31990bc585cdf249339600f553f80.tar.xz |
asterisk: Updated version 1.8.21.0 -> 1.8.23.1
Diffstat (limited to 'asterisk')
-rw-r--r-- | asterisk/.footprint | 3 | ||||
-rw-r--r-- | asterisk/.md5sum | 4 | ||||
-rw-r--r-- | asterisk/Pkgfile | 9 | ||||
-rw-r--r-- | asterisk/asterisk.rc | 53 |
4 files changed, 35 insertions, 34 deletions
diff --git a/asterisk/.footprint b/asterisk/.footprint index 92fb0f091..90ca53d13 100644 --- a/asterisk/.footprint +++ b/asterisk/.footprint @@ -328,7 +328,6 @@ drwxr-xr-x root/root usr/lib/asterisk/modules/ -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_agent.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_alsa.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_bridge.so --rwxr-xr-x root/root usr/lib/asterisk/modules/chan_console.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_dahdi.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_iax2.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_local.so @@ -429,6 +428,7 @@ drwxr-xr-x root/root usr/lib/asterisk/modules/ -rwxr-xr-x root/root usr/lib/asterisk/modules/res_curl.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_fax.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_fax_spandsp.so +-rwxr-xr-x root/root usr/lib/asterisk/modules/res_http_post.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_limit.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_monitor.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_musiconhold.so @@ -448,6 +448,7 @@ drwxr-xr-x root/root usr/lib/asterisk/modules/ -rwxr-xr-x root/root usr/lib/asterisk/modules/test_config.so -rwxr-xr-x root/root usr/lib/asterisk/modules/test_hashtab_thrash.so -rwxr-xr-x root/root usr/lib/asterisk/modules/test_linkedlists.so +-rwxr-xr-x root/root usr/lib/asterisk/modules/test_xml_escape.so drwxr-xr-x root/root usr/man/ drwxr-xr-x root/root usr/man/man8/ -rw-r--r-- root/root usr/man/man8/asterisk.8.gz diff --git a/asterisk/.md5sum b/asterisk/.md5sum index 1db132119..b0b105dd2 100644 --- a/asterisk/.md5sum +++ b/asterisk/.md5sum @@ -1,5 +1,5 @@ -abe7bd00e38c75d80ebcfea33ddc05f1 asterisk-1.8.21.0.tar.gz -6c08926394413df2b8c5cb34d7d1f3ff asterisk.rc +345a3801d536941d985106af824cdb72 asterisk-1.8.23.1.tar.gz +d0a434d3a84e7c8431be6e2a4a6db85b asterisk.rc 69940891ce39a2d14209f8c94d408311 build-disable-sounds-en-gsm.patch 8ded3aa36d9ebd42c88ebc995f4567dc build-disable-sounds-moh.patch 921ca0b9652076765330eb14cfd9436b build-enable-cdr-mysql.patch diff --git a/asterisk/Pkgfile b/asterisk/Pkgfile index 6f714f915..3000c206e 100644 --- a/asterisk/Pkgfile +++ b/asterisk/Pkgfile @@ -4,7 +4,7 @@ # Depends on: openssl ncurses name=asterisk -version=1.8.21.0 +version=1.8.23.1 release=1 source=( http://downloads.digium.com/pub/asterisk/releases/asterisk-$version.tar.gz @@ -19,7 +19,12 @@ build-disable-sounds-moh.patch build () { cd asterisk-$version - ./configure --prefix=/usr --with-ncurses --with-ssl --disable-xmldoc --with-sounds-cache=/tmp + ./configure \ + --prefix=/usr \ + --with-ncurses \ + --with-ssl \ + --disable-xmldoc \ + --with-sounds-cache=/tmp # Normally this file is created by running the interactive menuselect program cp $SRC/menuselect-tree . diff --git a/asterisk/asterisk.rc b/asterisk/asterisk.rc index 29870b4fc..fac89a66c 100644 --- a/asterisk/asterisk.rc +++ b/asterisk/asterisk.rc @@ -1,22 +1,21 @@ -#!/bin/sh -# -# /etc/rc.d/asterisk: start/stop/restart asterisk -# +#!/bin/bash NAME=asterisk USER=asterisk GROUP=asterisk RUNDIR=/var/run/$NAME PIDFILE=$RUNDIR/$NAME.pid -KILLINTCHECKS=30 -KILLINT=1 +STARTCMD="/usr/sbin/asterisk -G $GROUP -U $USER" +STOPCMD="/usr/sbin/asterisk -r -x 'core stop now'" +STOPGRACECMD="/usr/sbin/asterisk -r -x 'core stop gracefully'" +STOPTIMEOUT=300 case $1 in -start|startnice|startdebug) - [ -d $RUNDIR ] || install -d -m 750 -o $USER -g $GROUP $RUNDIR || exit 1 +start) + install -d -m 755 -o $USER $RUNDIR || exit 1 if [ -f $PIDFILE ]; then pid=$(< $PIDFILE) - if [ ! -d /proc/$pid -o -z "$pid" ]; then + if [ ! -d /proc/$pid ]; then echo "$NAME: removing stale pidfile $PIDFILE" >&2 rm -f $PIDFILE fi @@ -25,34 +24,29 @@ start|startnice|startdebug) echo "$NAME already running with pid $pid" >&2 exit 1 fi - [ $1 = "startnice" ] && echo "$NAME: starting" >&2 - cd / - if [ $1 = "startdebug" ]; then - /usr/sbin/asterisk -G $GROUP -U $USER -vvv - else - /usr/sbin/asterisk -G $GROUP -U $USER - fi + eval "$STARTCMD" ;; stop|stopnice) if [ -f $PIDFILE ]; then pid=$(< $PIDFILE) - if [ ! -d /proc/$pid -o -z "$pid" ]; then + if [ ! -d /proc/$pid ]; then echo "$NAME: removing stale pidfile $PIDFILE" >&2 rm -f $PIDFILE else - if [ $1 = "stop" ]; then - /usr/sbin/asterisk -r -x 'core stop now' + if [ "$1" == "stop" ]; then + eval "$STOPCMD" else - /usr/sbin/asterisk -r -x 'core stop gracefully' + eval "$STOPGRACECMD" fi - t=0 - while [ -d /proc/$pid -a $t -lt $KILLINTCHECKS ]; do - echo -n . - sleep $KILLINT - let t++ + t=$(printf '%(%s)T' -1) + tend=$((t+STOPTIMEOUT)) + while [ -d /proc/$pid -a $t -lt $tend ]; do + sleep 0.5 + t=$(printf '%(%s)T' -1) done if [ -d /proc/$pid ]; then echo "$NAME still running with pid $pid" >&2 + exit 1 else rm -f $PIDFILE fi @@ -60,15 +54,16 @@ stop|stopnice) else echo "$NAME is not running" >&2 fi + exit 0 ;; restart) - $0 stop + $0 stop && \ $0 start ;; restartnice) - $0 stopnice && $0 startnice - ;; + $0 stopnice && \ + $0 start *) - echo "usage: $0 [start|startnice|stop|stopnice|restart|restartnice]" + echo "usage: $0 [start|stop|stopnice|restart|restartnice]" ;; esac |