Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > b3e90c955d9c80902140d3e3ea04a60d > files > 2

siproxd-0.7.1-1mdv2009.0.src.rpm

#!/bin/sh
#
# Startup script for the siprox server daemon
#
# chkconfig: 345 80 75
# description: A SIP masquerading proxy with RTP support
# probe: false
# processname: siproxd
# pidfile: /var/run/siproxd/siproxd.pid
# config: /etc/siproxd.conf

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

[ -f /etc/siproxd.conf ] || exit 0

[ -f /usr/sbin/siproxd ] || exit 0


# See how we were called.
case "$1" in
  start)
	echo -n "Starting siprox server Daemon: "
	daemon /usr/sbin/siproxd --config /etc/siproxd.conf
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/siproxd
	;;
  stop)
	echo -n "Stopping siprox server Daemon: "
	killproc siproxd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/siproxd
	;;
  status)
	status siproxd
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: siproxd {start|stop|status|restart|reload}"
	exit 1
esac

exit $RETVAL