#! /bin/bash # Copyright (c) 2000-2002 SuSE GmbH Nuernberg, Germany. # Copyright (C) 2003,2004 SUSE Linux AG # Copyright (C) 2005-2008 SUSE LINUX Products GmbH # # Author: LUCE Johann # Maintainer: LUCE Johann # # /etc/init.d/ufw # ### BEGIN INIT INFO # Provides: ufw # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ufw_enable # Description: Uncomplicated Firewall ### END INIT INFO UFWALL="/usr/sbin/ufw" test -x $UFWALL || exit 5 . /etc/rc.status . /etc/ufw/ufw.conf rc_reset case "$1" in start) echo -n "checking if ufw enable" if [ $ENABLED == 'yes' ] ;then $UFWALL enable else echo -n "ufw is disable" fi rc_status -v ;; stop) rc_status ;; restart|force-reload) $O stop $0 start ;; try-restart|reload) if ($0 status) >/dev/null 2>&1; then $0 start else rc_reset fi ;; *) echo "Usage: $0 {start|stop|status|restart|reload|}" exit 1 ;; esac # Set exit status rc_exit