]>
Commit | Line | Data |
---|---|---|
b5a50b49 MT |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/rtpproxy | |
4 | # | |
5 | # Description : | |
6 | # | |
7 | # Authors : | |
8 | # | |
9 | # Version : 00.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) | |
19 | ||
20 | PORT_MIN=10000 | |
21 | PORT_MAX=10100 | |
22 | SOCKET="/var/run/rtpproxy.sock" | |
23 | LISTEN="${GREEN_ADDRESS}" | |
24 | CUSTOM_ARGS="" | |
25 | ||
26 | PIDFILE="/var/run/rtpproxy.pid" | |
27 | ||
28 | if [ -r "/etc/sysconfig/rtpproxy" ]; then | |
29 | . /etc/sysconfig/rtpproxy | |
30 | fi | |
31 | ||
32 | case "${1}" in | |
33 | start) | |
34 | boot_mesg "Starting rtpproxy..." | |
35 | loadproc /usr/bin/rtpproxy -u nobody -p ${PIDFILE} \ | |
36 | -m ${PORT_MIN} -M ${PORT_MAX} -s ${SOCKET} \ | |
37 | -l ${LISTEN} ${CUSTOM_ARGS} | |
38 | ;; | |
39 | ||
40 | stop) | |
41 | boot_mesg "Stopping rtpproxy..." | |
42 | killproc /usr/bin/rtpproxy | |
43 | ;; | |
44 | ||
45 | reload) | |
46 | boot_mesg "Reloading rtpproxy..." | |
47 | reloadproc /usr/bin/rtpproxy | |
48 | ;; | |
49 | ||
50 | restart) | |
51 | ${0} stop | |
52 | sleep 1 | |
53 | ${0} start | |
54 | ;; | |
55 | ||
56 | status) | |
57 | statusproc /usr/bin/rtpproxy | |
58 | ;; | |
59 | ||
60 | *) | |
61 | echo "Usage: ${0} {start|stop|reload|restart|status}" | |
62 | exit 1 | |
63 | ;; | |
64 | esac | |
65 | ||
66 | # End $rc_base/init.d/rtpproxy |