[ps-watcher] 19/88: own postinst and prerm
Jan Wagner
waja at alioth.debian.org
Fri Nov 8 23:06:33 UTC 2013
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository ps-watcher.
commit d35c0315dda9503d3f26d7e954f531300950153e
Author: Jan Wagner <waja at cyconet.org>
Date: Thu Nov 9 08:07:34 2006 +0000
own postinst and prerm
---
debian/changelog | 1 +
debian/init.d | 2 +-
debian/postinst | 18 ++++++++++++++++++
debian/prerm | 14 ++++++++++++++
4 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 4ca7517..c616aa5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ ps-watcher (1.06-2) unstable; urgency=low
* remove dh_strip from rules
* adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl)
* modifying initscript to prevent to start without config file
+ * provide own postinst and prerm scripts
-- Jan Wagner <waja at cyconet.org> Sat, 4 Nov 2006 21:38:44 +0100
diff --git a/debian/init.d b/debian/init.d
index e169955..4f7194b 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -47,7 +47,7 @@ not_configured () {
if [ -f "/etc/default/pswatcher" ]
then
. /etc/default/ps-watcher
- if [ "$startup" != "1" ] || [ -f $CONFIG ]
+ if [ "$startup" != "1" ] || [ ! -f $CONFIG ]
then
not_configured
fi
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..a70b870
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+if [ -f "/etc/default/pswatcher" ]
+then
+ . /etc/default/ps-watcher
+fi
+
+if [ -x "/etc/init.d/ps-watcher" ]; then
+ update-rc.d ps-watcher defaults 40 >/dev/null
+ if [ "$startup" == "1" ] && [ -f $CONFIG ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d ps-watcher start || exit $?
+ else
+ /etc/init.d/ps-watcher start || exit $?
+ fi
+ fi
+fi
+
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..06953aa
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+if [ -f "/etc/default/pswatcher" ]
+then
+ . /etc/default/ps-watcher
+fi
+
+if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" == "1" ] && [ -f $CONFIG ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d ps-watcher stop || exit $?
+ else
+ /etc/init.d/ps-watcher stop || exit $?
+ fi
+fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/ps-watcher.git
More information about the Pkg-perl-cvs-commits
mailing list