]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/packages/rtpproxy
mediatomb: move initscript to src/initscripts/packages and use new macro
[people/pmueller/ipfire-2.x.git] / src / initscripts / packages / rtpproxy
CommitLineData
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
18eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
19
20PORT_MIN=10000
21PORT_MAX=10100
22SOCKET="/var/run/rtpproxy.sock"
23LISTEN="${GREEN_ADDRESS}"
24CUSTOM_ARGS=""
25
26PIDFILE="/var/run/rtpproxy.pid"
27
28if [ -r "/etc/sysconfig/rtpproxy" ]; then
29 . /etc/sysconfig/rtpproxy
30fi
31
32case "${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 ;;
64esac
65
66# End $rc_base/init.d/rtpproxy