summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2013-11-15 09:33:42 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2013-11-15 09:34:05 (GMT)
commit357c024fd3a52de5d1caa70e38b1b43f07d940f7 (patch)
tree9d4ee1c6611cc59dc6a6902e4aa2db44411535bf
parent8e2e27f2b912d47e0cb7141093e9ce6c7827976a (diff)
downloadeofirewall-357c024fd3a52de5d1caa70e38b1b43f07d940f7.zip
eofirewall-357c024fd3a52de5d1caa70e38b1b43f07d940f7.tar.gz
eofirewall-357c024fd3a52de5d1caa70e38b1b43f07d940f7.tar.bz2
init.d: add a specefic init script for debian
-rw-r--r--debian/init.d43
-rwxr-xr-xdebian/rules2
2 files changed, 43 insertions, 2 deletions
diff --git a/debian/init.d b/debian/init.d
new file mode 100644
index 0000000..ae6ef01
--- /dev/null
+++ b/debian/init.d
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides: firewall
+# 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
diff --git a/debian/rules b/debian/rules
index 1a1e703..761c3f0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,5 +12,3 @@
%:
dh $@
-override_dh_installinit:
- dh_installinit --name=firewall