#!/bin/bash
### BEGIN INIT INFO
# Provides:          iptables-persistant
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts iptables persistant.
### END INIT INFO


function running()
{
    return 1
}

function start() {		
   iptables-restore < /etc/iptables.rules 
  
}

function stop() {
 
 return 1
}



case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    status)
       running
        if [[ $? = 0 ]]; then
           echo "Iptables is not running"
        else
           echo "Iptables is running"
        fi
    ;;
    running)
       running
        ;;
    *)
        echo "Usage:  {start|stop|status|restart[|running]"
        exit 1
        ;;
esac
exit $?
