summaryrefslogtreecommitdiffstats
path: root/extra/ufw/ufwd
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2010-01-23 22:33:43 +0100
committertnut <thierryn1 at hispeed dot ch>2010-01-23 22:33:43 +0100
commitd8fa3f11cb6edfd10a193f70cbc1995c986c8abf (patch)
tree3e38ac79297bfacc93ff21e34d2135d3ab81dc82 /extra/ufw/ufwd
parentff560295097626ea55bb75a4c552f9ffb9eb618a (diff)
downloadnutyx-pakxe-d8fa3f11cb6edfd10a193f70cbc1995c986c8abf.tar.gz
nutyx-pakxe-d8fa3f11cb6edfd10a193f70cbc1995c986c8abf.tar.bz2
nutyx-pakxe-d8fa3f11cb6edfd10a193f70cbc1995c986c8abf.tar.xz
nutyx-pakxe-d8fa3f11cb6edfd10a193f70cbc1995c986c8abf.zip
Ajout de ufw#0.29.1-1
Diffstat (limited to 'extra/ufw/ufwd')
-rw-r--r--extra/ufw/ufwd62
1 files changed, 62 insertions, 0 deletions
diff --git a/extra/ufw/ufwd b/extra/ufw/ufwd
new file mode 100644
index 000000000..07290643f
--- /dev/null
+++ b/extra/ufw/ufwd
@@ -0,0 +1,62 @@
+#!/bin/sh -e
+
+[ -x /usr/bin/ufw ] || exit 0
+
+for s in "/lib/ufw/ufw-init-functions" "/etc/ufw/ufw.conf" ; do
+ if [ -s "$s" ]; then
+ . "$s"
+ else
+ echo "Could not find $s (aborting)"
+ exit 1
+ fi
+done
+
+error=0
+case "$1" in
+start)
+ if [ "$ENABLED" = "yes" ] || [ "$ENABLED" = "YES" ]; then
+ echo "Starting firewall:" "ufw"
+ output=`ufw_start` || error="$?"
+ if [ ! -z "$output" ]; then
+ /bin/echo -e "$output"
+ fi
+ else
+ echo "Skip starting firewall:" "ufw (not enabled)"
+ fi
+ exit $error
+ ;;
+stop)
+ if [ "$ENABLED" = "yes" ] || [ "$ENABLED" = "YES" ]; then
+ echo "Stopping firewall:" "ufw"
+ output=`ufw_stop` || error="$?"
+ if [ ! -z "$output" ]; then
+ /bin/echo -e "$output"
+ fi
+ else
+ echo "Skip stopping firewall:" "ufw (not enabled)"
+ fi
+ exit $error
+ ;;
+restart|force-reload)
+ echo "Reloading firewall:" "ufw"
+ output=`ufw_reload` || error="$?"
+ if [ ! -z "$output" ]; then
+ /bin/echo -e "$output"
+ fi
+ exit $error
+ ;;
+status)
+ output=`ufw_status` || error="$?"
+ if [ ! -z "$output" ]; then
+ /bin/echo -e "$output"
+ fi
+ exit $error
+ ;;
+*)
+ echo "Usage: /etc/rc.d/ufw {start|stop|restart|force-reload|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
+