Group :: Sistema/Servidores
RPM: yate
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
#!/bin/sh
#
# yate: Starts the Yet Another Telephony Engine
#
# chkconfig: 345 95 10
# description: Starts and stops YATE used as Telephony Server
#
# processname: yate
# pidfile: /var/run/yate.pid
#
WITHOUT_RC_COMPAT=1
. /etc/init.d/functions
LOCKFILE=/var/lock/subsys/yate
PIDFILE=/var/run/yate.pid
RETVAL=0
# Extra Yate command line options
OPTS="-rs -vvv -l /var/log/yate"
# Source function library.
. /etc/rc.d/init.d/functions
RETVAL=0
start() {
unset DISPLAY
start_daemon --lockfile $LOCKFILE -- yate -d -p $PIDFILE $OPTS
RETVAL=$?
return $RETVAL
}
stop() {
unset DISPLAY
stop_daemon --pidfile $PIDFILE --lockfile $LOCKFILE -- yate
RETVAL=$?
return $RETVAL
}
reload() {
unset DISPLAY
msg_reloading yate
stop_daemon --pidfile $PIDFILE --lockfile $LOCKFILE -HUP -- yate
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status --pidfile $PIDFILE yate
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f $LOCKFILE ]; then
stop
start
fi
;;
condreload)
if [ -f $LOCKFILE ]; then
reload
fi
;;
reload)
reload
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|condreload|reload}"
;;
esac
exit $RETVAL