diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-15 06:47:44 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-15 06:47:44 +0000 |
commit | b361eb86e5d6928df346b8ca4bcfac03e9b3cdae (patch) | |
tree | 7c7d720f2216741e8d457429177cfd6424982d52 | |
parent | e161341358ccb5db48e3d6e0ad66c86efede2638 (diff) | |
parent | 12058bc904a1ae0793e0c6ebb173846bc001f6e3 (diff) | |
download | alpine_aports-b361eb86e5d6928df346b8ca4bcfac03e9b3cdae.tar.bz2 alpine_aports-b361eb86e5d6928df346b8ca4bcfac03e9b3cdae.tar.xz alpine_aports-b361eb86e5d6928df346b8ca4bcfac03e9b3cdae.zip |
Merge commit 'mmason/master'
-rw-r--r-- | extra/hylafax/APKBUILD (renamed from testing/hylafax/APKBUILD) | 0 | ||||
-rw-r--r-- | extra/hylafax/hylafax.post-install (renamed from testing/hylafax/hylafax.post-install) | 0 | ||||
-rw-r--r-- | extra/iaxmodem/iaxmodem.confd | 7 | ||||
-rw-r--r-- | extra/iaxmodem/iaxmodem.initd | 43 |
4 files changed, 50 insertions, 0 deletions
diff --git a/testing/hylafax/APKBUILD b/extra/hylafax/APKBUILD index 42450d4678..42450d4678 100644 --- a/testing/hylafax/APKBUILD +++ b/extra/hylafax/APKBUILD | |||
diff --git a/testing/hylafax/hylafax.post-install b/extra/hylafax/hylafax.post-install index 839f96f543..839f96f543 100644 --- a/testing/hylafax/hylafax.post-install +++ b/extra/hylafax/hylafax.post-install | |||
diff --git a/extra/iaxmodem/iaxmodem.confd b/extra/iaxmodem/iaxmodem.confd new file mode 100644 index 0000000000..082a920e0b --- /dev/null +++ b/extra/iaxmodem/iaxmodem.confd | |||
@@ -0,0 +1,7 @@ | |||
1 | # Configfile for /etc/init.d/iaxmodem | ||
2 | |||
3 | # Set the priority of the iaxmodem process | ||
4 | # Value: (highest) -20..19 (lowest) | ||
5 | # | ||
6 | #IAXMODEM_NICE="-5" | ||
7 | |||
diff --git a/extra/iaxmodem/iaxmodem.initd b/extra/iaxmodem/iaxmodem.initd new file mode 100644 index 0000000000..d6f2c947ac --- /dev/null +++ b/extra/iaxmodem/iaxmodem.initd | |||
@@ -0,0 +1,43 @@ | |||
1 | #!/sbin/runscript | ||
2 | # Copyright 1999-2008 Gentoo Foundation | ||
3 | # Distributed under the terms of the GNU General Public License v2 | ||
4 | # $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 $ | ||
5 | |||
6 | description="IAXmodem" | ||
7 | description_reload="Reread configuration file and make the appropriate changes" | ||
8 | extra_started_commands="reload" | ||
9 | command="/usr/sbin/iaxmodem" | ||
10 | pidfile="/var/run/iaxmodem.pid" | ||
11 | name="iaxmodem" | ||
12 | |||
13 | depend() { | ||
14 | use asterisk | ||
15 | need net | ||
16 | } | ||
17 | |||
18 | start() { | ||
19 | ebegin "Starting ${description}" | ||
20 | start-stop-daemon --start --quiet --pidfile "${pidfile}" \ | ||
21 | --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}" | ||
22 | eend ${?} | ||
23 | } | ||
24 | |||
25 | stop() { | ||
26 | local childs="" | ||
27 | ebegin "Stopping ${description}" | ||
28 | # start-stop-daemon doesn't kill childs reliable, so we | ||
29 | # use a combination of pgrep + start-stop-daemon + kill | ||
30 | [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}")) | ||
31 | start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5 | ||
32 | if eend ${?}; then | ||
33 | # if there're still childs running, kill them! | ||
34 | [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null | ||
35 | return 0 | ||
36 | fi | ||
37 | } | ||
38 | |||
39 | reload() { | ||
40 | ebegin "Reloading ${description} configuration" | ||
41 | start-stop-daemon --stop --signal HUP --pidfile "${pidfile}" | ||
42 | eend ${?} | ||
43 | } | ||