#!/bin/sh
. /etc/profile
. /opt/gira/share/devicestack/ipmodule-vars
. /opt/gira/bin/environment

case "$1" in
  start|restart)
    # delete all rules
    /usr/sbin/iptables --flush
    # activate ise smart connect rules
	/usr/sbin/iptables-restore < /etc/iptables/isc.rules
    ;;
  stop)
    # delete all rules
    /usr/sbin/iptables-restore < /etc/iptables/isc_empty.rules
    ;;
  *)
    echo "Usage: $0 (start|stop|restart)"
    exit 1
esac

exit 0