aboutsummaryrefslogtreecommitdiffstats
path: root/main/iaxmodem/iaxmodem.initd
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2013-05-16 06:45:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-05-16 08:13:19 +0000
commit6539f7f03e81cd710b37aa1a8ebd65ba19908fb1 (patch)
tree5ac595f513eb498d8e8a208576dd45bd66250283 /main/iaxmodem/iaxmodem.initd
parenta5bf64c2f98a19565d2ba22d65079b56489a5f9f (diff)
downloadaports-6539f7f03e81cd710b37aa1a8ebd65ba19908fb1.tar.bz2
aports-6539f7f03e81cd710b37aa1a8ebd65ba19908fb1.tar.xz
main/iaxmodem: Adding init.d and conf.d scripts
Diffstat (limited to 'main/iaxmodem/iaxmodem.initd')
-rw-r--r--main/iaxmodem/iaxmodem.initd13
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 ${?}
}