blob: 4a40f18bcca135bf8896fb5fa3b978e5bd5ab561 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#!/bin/bash
#
# /etc/rc.d/init.d/siproxd
#
# Starts the siproxd daemon
#
# description: Listen and dispatch SIP messages
# processname: siproxd
DAEMON=/usr/sbin/siproxd
NAME=siproxd
test -x $DAEMON || exit 0
start() {
echo -n $"Starting sip proxy: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_OPTS || true
echo "$NAME."
}
stop() {
echo -n $"Stopping sip proxy: "
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON || true
echo "$NAME."
}
restart() {
stop
start
}
reload() {
trap "" SIGHUP
killall -HUP siproxd
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit 0
|