Bug#281524: running asterisk with realtime priority
Tzafrir Cohen
Tzafrir Cohen <tzafrir.cohen@xorcom.com> (by way of Mark Purcell <msp@debian.org>), 281524@bugs.debian.org
Thu, 2 Dec 2004 01:21:23 +1100
--Boundary-00=_jNdrBLbBqHo+nWn
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi
On Wed, Nov 17, 2004 at 10:07:48AM +0200, Tzafrir Cohen wrote:
> I attach some files from the debian/ subdirectory of our package.
And this time the correct copy of asterisk.init
--
Tzafrir Cohen icq#16849755 050-7952406
tzafrir.cohen@xorcom.com http://xorcom.com
--Boundary-00=_jNdrBLbBqHo+nWn
Content-Type: text/plain;
charset="us-ascii";
name=" "
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="asterisk.init"
#! /bin/sh
#
# asterisk start the asterisk PBX
# (c) Mark Purcell <msp@debian.org>
# May be distributed under the terms of this General Public License
#
# Based on:
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian GNU/Linux
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/asterisk
NAME=asterisk
USER=$NAME
DESC="Asterisk PBX"
# by default: use real-time priority
PARAMS=""
AST_REALTIME="yes"
if [ -x /etc/default/asterisk ]; then . /etc/default/asterisk; fi
if [ "$AST_REALTIME" != "no" ]
then
PARAMS="$PARAMS -p"
fi
if [ "x$USER" != x ] && [ "x$USER" != xroot ]
then
PARAMS="$PARAMS -U $USER"
fi
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --exec $DAEMON -- $PARAMS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
$DAEMON -rx 'stop now' > /dev/null && echo -n "$NAME"
echo "."
exit 0
;;
reload)
echo "Reloading $DESC configuration files."
$DAEMON -rx 'reload'
;;
logger-reload)
$DAEMON -rx 'logger reload'
;;
extensions-reload)
echo "Reloading $DESC configuration files."
$DAEMON -rx 'extensions reload'
;;
restart|force-reload)
$DAEMON -rx 'restart gracefully' > /dev/null && echo -n "$NAME"
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|logger-reload|extensions-reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
--Boundary-00=_jNdrBLbBqHo+nWn--