summaryrefslogtreecommitdiff
path: root/org.handhelds.familiar/packages/gpe-shield/ipshield
diff options
context:
space:
mode:
Diffstat (limited to 'org.handhelds.familiar/packages/gpe-shield/ipshield')
-rwxr-xr-xorg.handhelds.familiar/packages/gpe-shield/ipshield50
1 files changed, 50 insertions, 0 deletions
diff --git a/org.handhelds.familiar/packages/gpe-shield/ipshield b/org.handhelds.familiar/packages/gpe-shield/ipshield
new file mode 100755
index 0000000..41160c0
--- /dev/null
+++ b/org.handhelds.familiar/packages/gpe-shield/ipshield
@@ -0,0 +1,50 @@
+#! /bin/sh
+#
+# Startup script for gpe firewall engine.
+# Based on debian skeleton.
+#
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+GPE_SHIELD=/usr/bin/gpe-shield
+IPTABLES=/usr/sbin/iptables
+NAME=gpe-shield
+DESC="GPE desktop firewall"
+
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Gracefully exit if the package has been removed.
+test -x $GPE_SHIELD || exit 0
+
+# Read config file if it is present.
+#if [ -r /etc/default/$NAME ]
+#then
+# . /etc/default/$NAME
+#fi
+
+
+case "$1" in
+ start)
+ test -f /etc/access.conf || exit 0
+
+ echo -n "Starting $DESC: $NAME"
+ if [ -f /etc/gpe/gpe-shield-load ]
+ then
+ $GPE_SHIELD --activate > /dev/null && echo -n " done"
+ else
+ echo -n " deactivated"
+ fi
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ ($IPTABLES --flush && $IPTABLES -P INPUT ACCEPT) > /dev/null && echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0