]> git.pld-linux.org Git - packages/frox.git/commitdiff
- simple port forwarding for transparent proxying
authorJacek Konieczny <jajcus@pld-linux.org>
Mon, 23 Sep 2002 13:13:14 +0000 (13:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    frox.init -> 1.2

frox.init

index 52acf8ea4de3e6d0a22e532db31ff6e4c3744f4a..59666b58cbff99ad6e723f042dc3272b15df7176 100644 (file)
--- a/frox.init
+++ b/frox.init
@@ -8,6 +8,9 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+# Configuration file.
+. /etc/sysconfig/frox
+
 # See how we were called.
 case "$1" in
   start)
@@ -17,6 +20,12 @@ case "$1" in
                daemon frox -f /etc/frox.conf
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/frox
+               if [ -x /usr/sbin/iptables -a -n "$IPTABLES_RULE" ] ; then
+                       action "Redirecting FTP traffic" /usr/sbin/iptables -A $IPTABLES_RULE
+               fi
+               if [ -x /sbin/ipchains -a -n "$IPCHAINS_RULE" ] ; then
+                       action "Redirecting FTP traffic" /sbin/ipchains -A $IPCHAINS_RULE
+               fi
        else
                msg_Already_Running frox
                exit 1
@@ -25,6 +34,12 @@ case "$1" in
   stop)
         # Stop daemons.
        if [ -f /var/lock/subsys/frox ]; then
+               if [ -x /usr/sbin/iptables -a -n "$IPTABLES_RULE" ] ; then
+                       action "Removing FTP traffic redirection" /usr/sbin/iptables -D $IPTABLES_RULE
+               fi
+               if [ -x /sbin/ipchains -a -n "$IPCHAINS_RULE" ] ; then
+                       action "Removing FTP traffic redirection" /sbin/ipchains -D $IPCHAINS_RULE
+               fi
                 msg_stopping frox
                 killproc frox
                 rm -f /var/lock/subsys/frox /var/run/frox.pid >/dev/null 2>&1
This page took 0.063025 seconds and 4 git commands to generate.