diff options
Diffstat (limited to 'net-voip/yate/files/yate.initd')
-rw-r--r-- | net-voip/yate/files/yate.initd | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/net-voip/yate/files/yate.initd b/net-voip/yate/files/yate.initd new file mode 100644 index 000000000000..01f07f4a538d --- /dev/null +++ b/net-voip/yate/files/yate.initd @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +opts="${opts} reload" + +YATE_PIDFILE=${YATE_PIDFILE:-/var/run/${SVCNAME}.pid} +YATE_BINARY=${YATE_BINARY:-/usr/bin/yate} + +depend() { + need net + use mysql postgresql zaptel +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec "${YATE_BINARY}" \ + -- -d -p "${YATE_PIDFILE}" ${YATE_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile="${YATE_PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --stop --exec "${YATE_BINARY}" \ + --pidfile "${YATE_PIDFILE}" --signal HUP --oknodo + eend $? +} |