diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..a7c85c1 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +if [ -x "/etc/init.d/dns-flood-detector" ]; then + update-rc.d dns-flood-detector defaults 40 >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d dns-flood-detector start || exit $? + else + /etc/init.d/dns-flood-detector start || exit $? + fi +fi diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..ea57f84 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ "$1" = "purge" ] ; then + update-rc.d dns-flood-detector remove >/dev/null || exit $? +fi diff --git a/debian/rules b/debian/rules index a812ee3..6d542ec 100755 --- a/debian/rules +++ b/debian/rules @@ -50,7 +50,6 @@ binary-arch: build install dh_testroot dh_installchangelogs dh_installdocs - dh_installinit -- defaults 40 dh_installman debian/dns-flood-detector.8 dh_link dh_strip