]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
rtpproxy: Add initscript
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 29 Apr 2016 20:07:13 +0000 (21:07 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 29 Apr 2016 20:07:13 +0000 (21:07 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/armv5tel/initscripts
config/rootfiles/common/i586/initscripts
config/rootfiles/common/x86_64/initscripts
config/rootfiles/packages/rtpproxy
src/initscripts/init.d/rtpproxy [new file with mode: 0755]
src/paks/rtpproxy/install.sh [new file with mode: 0644]
src/paks/rtpproxy/uninstall.sh [new file with mode: 0644]
src/paks/rtpproxy/update.sh [new file with mode: 0644]

index e6d328bb5ae9f636964bcac219bfa623f1e152f9..b827b1c19dbbd5e9e814097800ae05181596aba9 100644 (file)
@@ -110,6 +110,7 @@ etc/rc.d/init.d/random
 etc/rc.d/init.d/rc
 etc/rc.d/init.d/reboot
 etc/rc.d/init.d/rngd
+#etc/rc.d/init.d/rtpproxy
 #etc/rc.d/init.d/samba
 #etc/rc.d/init.d/sane
 etc/rc.d/init.d/sendsignals
index 80ae0dd2d762a3fad31bf5613775bb55fc766bd7..51185f63ffb0cdf1f2ef2df8fb1ddf0297c87462 100644 (file)
@@ -112,6 +112,7 @@ etc/rc.d/init.d/random
 etc/rc.d/init.d/rc
 etc/rc.d/init.d/reboot
 etc/rc.d/init.d/rngd
+#etc/rc.d/init.d/rtpproxy
 #etc/rc.d/init.d/samba
 #etc/rc.d/init.d/sane
 etc/rc.d/init.d/sendsignals
index 80ae0dd2d762a3fad31bf5613775bb55fc766bd7..51185f63ffb0cdf1f2ef2df8fb1ddf0297c87462 100644 (file)
@@ -112,6 +112,7 @@ etc/rc.d/init.d/random
 etc/rc.d/init.d/rc
 etc/rc.d/init.d/reboot
 etc/rc.d/init.d/rngd
+#etc/rc.d/init.d/rtpproxy
 #etc/rc.d/init.d/samba
 #etc/rc.d/init.d/sane
 etc/rc.d/init.d/sendsignals
index 4fe1b5a6e5332234b4dad6cf6d2fc107c5a4b22b..6fcc1e44c834b14e93ceff7486f23aef9c8ee9ae 100644 (file)
@@ -1,3 +1,4 @@
+etc/rc.d/init.d/rtpproxy
 usr/bin/makeann
 usr/bin/rtpproxy
 #usr/bin/rtpproxy_debug
diff --git a/src/initscripts/init.d/rtpproxy b/src/initscripts/init.d/rtpproxy
new file mode 100755 (executable)
index 0000000..3ea72f5
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/rtpproxy
+#
+# Description :
+#
+# Authors     :
+#
+# Version     : 00.00
+#
+# Notes       :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+
+PORT_MIN=10000
+PORT_MAX=10100
+SOCKET="/var/run/rtpproxy.sock"
+LISTEN="${GREEN_ADDRESS}"
+CUSTOM_ARGS=""
+
+PIDFILE="/var/run/rtpproxy.pid"
+
+if [ -r "/etc/sysconfig/rtpproxy" ]; then
+       . /etc/sysconfig/rtpproxy
+fi
+
+case "${1}" in
+       start)
+               boot_mesg "Starting rtpproxy..."
+               loadproc /usr/bin/rtpproxy -u nobody -p ${PIDFILE} \
+                       -m ${PORT_MIN} -M ${PORT_MAX} -s ${SOCKET} \
+                       -l ${LISTEN} ${CUSTOM_ARGS}
+               ;;
+
+       stop)
+               boot_mesg "Stopping rtpproxy..."
+               killproc /usr/bin/rtpproxy
+               ;;
+
+       reload)
+               boot_mesg "Reloading rtpproxy..."
+               reloadproc /usr/bin/rtpproxy
+               ;;
+
+       restart)
+               ${0} stop
+               sleep 1
+               ${0} start
+               ;;
+
+       status)
+               statusproc /usr/bin/rtpproxy
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/rtpproxy
diff --git a/src/paks/rtpproxy/install.sh b/src/paks/rtpproxy/install.sh
new file mode 100644 (file)
index 0000000..02a5219
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+start_service ${NAME}
+ln -svf  ../init.d/rtpproxy /etc/rc.d/rc0.d/K00rtpproxy
+ln -svf  ../init.d/rtpproxy /etc/rc.d/rc3.d/S99rtpproxy
+ln -svf  ../init.d/rtpproxy /etc/rc.d/rc6.d/K00rtpproxy
diff --git a/src/paks/rtpproxy/uninstall.sh b/src/paks/rtpproxy/uninstall.sh
new file mode 100644 (file)
index 0000000..e9076d1
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+remove_files
+rm -rf /etc/rc.d/rc*.d/*rtpproxy
diff --git a/src/paks/rtpproxy/update.sh b/src/paks/rtpproxy/update.sh
new file mode 100644 (file)
index 0000000..89c40d0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh