diff options
Diffstat (limited to 'main/iaxmodem/iaxmodem.initd')
-rw-r--r-- | main/iaxmodem/iaxmodem.initd | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/main/iaxmodem/iaxmodem.initd b/main/iaxmodem/iaxmodem.initd index 7f072e6c26..44551aa98f 100644 --- a/main/iaxmodem/iaxmodem.initd +++ b/main/iaxmodem/iaxmodem.initd @@ -3,11 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/iaxmodem/files/iaxmodem.initd,v 1.1 2008/10/14 23:53:39 sbriesen Exp $ -description="IAXmodem" -description_reload="Reread configuration file and make the appropriate changes" -extra_started_commands="reload" command="/usr/sbin/iaxmodem" -pidfile="/var/run/iaxmodem.pid" +pidfile="/var/run/${SVCNAME}.pid" name="iaxmodem" depend() { @@ -17,15 +14,15 @@ depend() { } start() { - ebegin "Starting ${description}" + ebegin "Starting ${SVCNAME}" start-stop-daemon --start --quiet --pidfile "${pidfile}" \ - --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}" + --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}" -- ${IAXMODEM_OPTS} eend ${?} } stop() { local childs="" - ebegin "Stopping ${description}" + ebegin "Stopping ${SVCNAME}" # start-stop-daemon doesn't kill childs reliable, so we # use a combination of pgrep + start-stop-daemon + kill [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}")) @@ -38,7 +35,7 @@ stop() { } reload() { - ebegin "Reloading ${description} configuration" + ebegin "Reloading ${SVCNAME} configuration" start-stop-daemon --stop --signal HUP --pidfile "${pidfile}" eend ${?} } |