3
# Modified for use with Siproxd by Dan Weber <dan@mirrorlynx.com>
4
# Author: Miquel van Smoorenburg <miquels@cistron.nl>.
5
# Ian Murdock <imurdock@gnu.ai.mit.edu>.
7
# You may remove the "Author" lines above and replace them
8
# with your own name if you copy and modify this script.
10
# Version: @(#)skeleton 1.9.4 21-Mar-2004 miquels@cistron.nl
15
# Required-Start: $local_fs $remote_fs
16
# Required-Stop: $local_fs $remote_fs
19
# Default-Start: 2 3 4 5
21
# Short-Description: SIP Proxy Daemon
22
# Description: Proxy for SIP channels of VoIP clients
27
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
29
DAEMON=/usr/sbin/$NAME
32
PIDFILE=/var/run/$NAME/$NAME.pid
33
SCRIPTNAME=/etc/init.d/$NAME
35
# Gracefully exit if the package has been removed.
36
test -x $DAEMON || exit 0
38
# Make sure /var/run/$NAME exists
39
test -d /var/run/$NAME || install -d -o siproxd -g siproxd /var/run/$NAME
41
# Read config file if it is present.
42
if [ -r /etc/default/$NAME ]
47
if [ "$ENABLED" = "0" ]
49
echo "To enable siproxd, the sip proxy, modify /etc/default/siproxd"
55
echo -n "Starting $DESC: $NAME"
56
start-stop-daemon --start --quiet --pidfile $PIDFILE \
57
--exec $DAEMON -- -p $PIDFILE
63
echo -n "Stopping $DESC: $NAME"
64
if test -e $PIDFILE; then
65
start-stop-daemon --stop --quiet --pidfile $PIDFILE
83
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2