# Source function library
. /etc/rc.d/init.d/functions
+# Configuration file.
+. /etc/sysconfig/frox
+
# See how we were called.
case "$1" in
start)
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
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