own postinst and prerm
This commit is contained in:
parent
6f07969451
commit
d35c0315dd
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -3,6 +3,7 @@ ps-watcher (1.06-2) unstable; urgency=low
|
||||||
* remove dh_strip from rules
|
* remove dh_strip from rules
|
||||||
* adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl)
|
* adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl)
|
||||||
* modifying initscript to prevent to start without config file
|
* modifying initscript to prevent to start without config file
|
||||||
|
* provide own postinst and prerm scripts
|
||||||
|
|
||||||
-- Jan Wagner <waja@cyconet.org> Sat, 4 Nov 2006 21:38:44 +0100
|
-- Jan Wagner <waja@cyconet.org> Sat, 4 Nov 2006 21:38:44 +0100
|
||||||
|
|
||||||
|
|
2
debian/init.d
vendored
2
debian/init.d
vendored
|
@ -47,7 +47,7 @@ not_configured () {
|
||||||
if [ -f "/etc/default/pswatcher" ]
|
if [ -f "/etc/default/pswatcher" ]
|
||||||
then
|
then
|
||||||
. /etc/default/ps-watcher
|
. /etc/default/ps-watcher
|
||||||
if [ "$startup" != "1" ] || [ -f $CONFIG ]
|
if [ "$startup" != "1" ] || [ ! -f $CONFIG ]
|
||||||
then
|
then
|
||||||
not_configured
|
not_configured
|
||||||
fi
|
fi
|
||||||
|
|
18
debian/postinst
vendored
Normal file
18
debian/postinst
vendored
Normal file
|
@ -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
|
||||||
|
|
14
debian/prerm
vendored
Normal file
14
debian/prerm
vendored
Normal file
|
@ -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
|
Loading…
Reference in a new issue