From 26e209abb1a15f4a778ca2c0efd953e9957a814a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 10 Nov 2006 07:45:27 +0000 Subject: [PATCH] provide own postinst and postrm --- debian/postinst | 11 +++++++++++ debian/postrm | 6 ++++++ debian/rules | 1 - 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 debian/postinst create mode 100755 debian/postrm 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