aboutsummaryrefslogtreecommitdiffstats
path: root/extra/iaxmodem/iaxmodem.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /extra/iaxmodem/iaxmodem.initd
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'extra/iaxmodem/iaxmodem.initd')
-rw-r--r--extra/iaxmodem/iaxmodem.initd43
1 files changed, 0 insertions, 43 deletions
diff --git a/extra/iaxmodem/iaxmodem.initd b/extra/iaxmodem/iaxmodem.initd
deleted file mode 100644
index d6f2c947ac..0000000000
--- a/extra/iaxmodem/iaxmodem.initd
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# 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"
-name="iaxmodem"
-
-depend() {
- use asterisk
- need net
-}
-
-start() {
- ebegin "Starting ${description}"
- start-stop-daemon --start --quiet --pidfile "${pidfile}" \
- --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}"
- eend ${?}
-}
-
-stop() {
- local childs=""
- ebegin "Stopping ${description}"
- # 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}"))
- start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5
- if eend ${?}; then
- # if there're still childs running, kill them!
- [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null
- return 0
- fi
-}
-
-reload() {
- ebegin "Reloading ${description} configuration"
- start-stop-daemon --stop --signal HUP --pidfile "${pidfile}"
- eend ${?}
-}