Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor amends

  • Loading branch information...
commit aff90ecceddc6c6e5999e2ba493dff5d9bb073ec 1 parent 5894e9f
@kiall authored
View
12 lib/Vyatta/Siproxd.pm
@@ -1,5 +1,5 @@
#
-# Module: Vyatta::Netflow.pm
+# Module: Vyatta::Siproxd.pm
#
# **** License ****
# This program is free software; you can redistribute it and/or modify
@@ -11,13 +11,13 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2008-2009 Vyatta, Inc.
+# This code was originally developed by Managed I.T.
+# Portions created by Managed I.T. are Copyright (C) 2010 Managed I.T.
# All Rights Reserved.
#
-# Author: Stig Thormodsrud
-# Date: June 2009
-# Description: Common netflow definitions/funcitions
+# Author: Kiall Mac Innes
+# Date: May 2010
+# Description: Common Siproxd definitions/funcitions
#
# **** End License ****
#
View
14 scripts/system/siproxd-config.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# Module: siproxd-config.pl
+# Module: Vyatta::Siproxd.pm
#
# **** License ****
# This program is free software; you can redistribute it and/or modify
@@ -11,13 +11,13 @@
# 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.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2008-2010 Vyatta, Inc.
+#
+# This code was originally developed by Managed I.T.
+# Portions created by Managed I.T. are Copyright (C) 2010 Managed I.T.
# All Rights Reserved.
#
# Author: Kiall Mac Innes
-# Date: April 2010
+# Date: May 2010
# Description: Script to configure sip proxy (siproxd).
#
# **** End License ****
@@ -44,7 +44,7 @@
);
if ($setup_siproxd) {
- # TODO: Change from PREROUTING to VYATTA_PRE_DNAT_HOOK
+ # TODO: Change from PREROUTING to VYATTA_PRE_DNAT_HOOK after kenwood
system("sudo iptables -t nat -N SIPROXD");
system("sudo iptables -t nat -I PREROUTING 1 -j SIPROXD");
exit 0;
@@ -55,7 +55,7 @@
}
if ($stop_siproxd) {
- # TODO: Change from PREROUTING to VYATTA_PRE_DNAT_HOOK
+ # TODO: Change from PREROUTING to VYATTA_PRE_DNAT_HOOK after kenwood
system("sudo iptables -t nat -D PREROUTING -j SIPROXD");
system("sudo iptables -t nat -F SIPROXD");
system("sudo iptables -t nat -X SIPROXD");
View
10 scripts/system/siproxd-interface-config.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# Module: siproxd-interface-config.pl
+# Module: Vyatta::Siproxd.pm
#
# **** License ****
# This program is free software; you can redistribute it and/or modify
@@ -11,13 +11,13 @@
# 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.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2008-2010 Vyatta, Inc.
+#
+# This code was originally developed by Managed I.T.
+# Portions created by Managed I.T. are Copyright (C) 2010 Managed I.T.
# All Rights Reserved.
#
# Author: Kiall Mac Innes
-# Date: April 2010
+# Date: May 2010
# Description: Script to configure sip proxy (siproxd).
#
# **** End License ****
View
67 scripts/system/siproxd.init
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-. /lib/lsb/init-functions
-
-CONFIGFILE=/opt/vyatta/etc/siproxd.conf
-PIDFILE=/var/run/siproxd.pid
-
-start() {
- if [ ! -f "$CONFIGFILE" ]; then
- log_failure_msg "Cannot start the SIP Proxy because configuration file $CONFIGFILE is absent."
- exit 1
- fi
-}
-
-stop() {
- if [ -f "$PIDFILE" ]; then
- PID=`cat $PIDFILE`
- if [ -n "$PID" ]; then
- OUTPUT=`start-stop-daemon -q --stop --pidfile $PIDFILE 2>&1`
-
-# Commenting out verification loop for now. Process goes into zombie state only on
-# system startup. This causes a loop greater that 20 seconds which forces rtrmgr
-# to commit suicide.
-# while [ -d "/proc/$PID" ]; do
-# sleep 1
-# done
- fi
- rm -f $PIDFILE
- fi
-
-}
-
-restart () {
- if [ -f "$PIDFILE" ]; then
- PID=`cat $PIDFILE`
- fi
-
- if [ -n "$PID" ] && [ -d "/proc/$PID" ]; then
- OUTPUT=`kill -HUP $PID`
- else
- start
- fi
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- # note I am disabling restart because no sig will cause dnsmasq to re-read it's config file.
- # this is not good since I think it loses it's cache file on complete restart.
- # maybe we can fix this when we shift away from dnsmasq. Hence I leave the original code
- # in this file
- # restart
- ;;
- *)
- log_failure_msg "usage: $0 {start|stop|restart}"
- exit 1
- ;;
-esac
-
-exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.