summaryrefslogtreecommitdiff
blob: bc4da5a7f0f32d78e7cb2cce1e22df13cdc4dc2f (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

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/iaxmodem
NAME=iaxmodem
DESC=iaxmodem

depend() {
        need net hylafax
}

start() {
	ebegin "Starting $DESC: "
	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
		--exec $DAEMON
	eend $?
}
stop() {
	ebegin "Stopping $DESC: "
	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
		--exec $DAEMON
	eend $?
}
reload() {
	ebegin "Reloading $DESC: "
	if [ -e /var/run/$NAME.pid ]; then
	    kill -HUP $(cat /var/run/$NAME.pid)
	    eend 0
	else
	    echo "$NAME not running!"
	    eend 1
	fi
}