This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
2013-11-15 10:33:42 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
### BEGIN INIT INFO
|
2013-11-22 10:19:45 +01:00
|
|
|
# Provides: eofirewall
|
2013-11-15 10:33:42 +01:00
|
|
|
# Required-Start: $remote_fs $syslog $network
|
|
|
|
# Required-Stop: $remote_fs $syslog $network
|
|
|
|
# Default-Start: 2 3 4 5
|
|
|
|
# Default-Stop: 0 1 6
|
|
|
|
# Short-Description: Iptables firewall
|
|
|
|
# Description: An iptables firewall
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
|
|
|
|
NAME="eofirewall"
|
|
|
|
SCRIPT="/usr/bin/$NAME"
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
log_daemon_msg "Starting firewall"
|
|
|
|
/usr/bin/$NAME load || exit 1
|
|
|
|
log_end_msg 0
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
log_daemon_msg "Stopping firewall"
|
|
|
|
/usr/bin/$NAME clean || exit 1
|
|
|
|
log_end_msg 0
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
log_daemon_msg "Reloading firewall"
|
|
|
|
/usr/bin/$NAME clean || exit 1
|
|
|
|
/usr/bin/$NAME load || exit 1
|
|
|
|
log_end_msg 0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
N=/etc/init.d/$NAME
|
|
|
|
echo "Usage: $N {start|stop|restart|reload}"
|
|
|
|
exit 2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|