Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # cat /etc/init.d/firewall
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: firewall
- # Required-Start: $network
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Firewall
- # Description: Firewall
- # :-)
- ### END INIT INFO
- # Author: Martin Vancl <[email protected]>
- #
- # Do NOT "set -e"
- # Load the VERBOSE setting and other rcS variables
- . /lib/init/vars.sh
- # Define LSB log_* functions.
- # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
- # and status_of_proc is working.
- . /lib/lsb/init-functions
- do_start()
- {
- /usr/local/bin/firewall.sh
- service fail2ban restart
- }
- do_status()
- {
- echo -e "-------------------------------\nROUTE:\n"
- route -n
- echo -e "\n-------------------------------\nIPTABLES:\n"
- iptables -L -n -v
- }
- case "$1" in
- start)
- do_start
- ;;
- status)
- do_status
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|status}" >&2
- exit 3
- ;;
- esac
- :
- root@eu:/media/data/home/spravce#
Advertisement
Add Comment
Please, Sign In to add comment