blob: e912179cd836ae24c49fd9e8a193f73d5215f8e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.initd,v 1.1 2004/12/23 22:12:34 mrness Exp $
opts="start stop"
depend() {
need isdn
}
start() {
local CONTR="${myservice#*.contr}" CTRL=$((CONTR * 2))
local CONFIG="/etc/isdn/isdnlog.isdnctrl${CTRL}.options"
[ -e "$CONFIG" ] || CONFIG="/etc/isdn/isdnlog.options.contr${CONTR}"
if [ ! -e "$CONFIG" ] ; then
eerror "You're missing ${CONFIG}"
return 1
fi
ebegin "Starting ISDNLOG for controller #${CONTR}"
start-stop-daemon --start --quiet --pidfile "/var/run/isdnlog.isdnctrl${CTRL}.pid" \
--exec /usr/sbin/isdnlog -- ${ISDNLOG_OPTIONS} -f "${CONFIG}" "/dev/isdnctrl${CTRL}"
eend $?
}
stop() {
local CONTR="${myservice#*.contr}" CTRL=$((CONTR * 2))
ebegin "Stopping ISDNLOG for controller #${CONTR}"
start-stop-daemon --stop --quiet --retry 5 --pidfile "/var/run/isdnlog.isdnctrl${CTRL}.pid"
eend $?
}
|