"Fossies" - the Fresh Open Source Software Archive

Member "aif-2.1.1/etc/init.d/arno-iptables-firewall" (16 Sep 2020, 1839 Bytes) of package /linux/privat/aif-2.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "arno-iptables-firewall": 2.0.3_vs_2.1.0.

    1 #!/bin/sh
    2 #
    3 # chkconfig: 2345 09 91
    4 # description: init.d script for Arno's Iptables Firewall(AIF)
    5 
    6 ### BEGIN INIT INFO
    7 # Provides:          arno-iptables-firewall
    8 # Required-Start:    $local_fs $remote_fs $network
    9 # Required-Stop:     $local_fs $remote_fs $network
   10 # Default-Start:     S
   11 # Default-Stop:      0 6
   12 # Short-Description: Setup iptables firewall configuration
   13 ### END INIT INFO
   14 
   15 ############################################################################################
   16 # You should put this script in eg. "/etc/init.d/" .                                       #
   17 # Furthermore make sure it's executable! -> "chmod 700" or "chmod +x" it                   #
   18 # If you want to run it upon boot, either add an entry in your "/etc/rc.d/rc.local" or     #
   19 # (for eg. Debian) in "/etc/rcS.d/" create a symlink to the arno-iptables-firewall script  #
   20 # ("ln -s /etc/init.d/arno-iptables-firewall script S99-arno-iptables-firewall script").   #
   21 ############################################################################################
   22 
   23 PATH=/bin:/usr/bin:/sbin:/usr/sbin
   24 PROGRAM="/usr/local/sbin/arno-iptables-firewall"
   25 
   26 # Be verbose(1)?:
   27 VERBOSE=0
   28 
   29 test -x $PROGRAM || exit 0
   30 
   31 if [ "$VERBOSE" = "0" ]; then
   32   case "$1" in
   33     start)
   34       echo "Starting Arno's Iptables Firewall(AIF)..."
   35     ;;
   36 
   37     stop)
   38       echo "Stopping Arno's Iptables Firewall(AIF)..."
   39     ;;
   40 
   41     restart)
   42       echo "Restarting Arno's Iptables Firewall(AIF)..."
   43     ;;
   44 
   45     force-reload)
   46       echo "(Forced) reloading Arno's Iptables Firewall(AIF)..."
   47     ;;
   48 
   49     status)
   50       $PROGRAM $*
   51       exit $?
   52     ;;
   53 
   54     configtest)
   55       $PROGRAM check-conf
   56       exit $?
   57     ;;
   58 
   59     *)
   60       $PROGRAM
   61       exit 1
   62     ;;
   63   esac
   64 
   65   # Call firewall script:
   66   result=`$PROGRAM $*`
   67   retval=$?
   68 else
   69   $PROGRAM $*
   70   retval=$?
   71 fi
   72 
   73 # Return value:
   74 exit $retval
   75