Commit 7289c097 authored by Constantinos Venetsanopoulos's avatar Constantinos Venetsanopoulos Committed by Constantinos Venetsanopoulos
Browse files

Enhance packaging of snf-ganeti-tools

Add postinst and prerm scripts for snf-ganeti-tools
that update the rc.d links of /etc/init.d/snf-ganeti-eventd
and start/stop the daemon accordingly
parent daa47160
#!/bin/sh
# postinst script for snf-image-host
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
echo "Updating rc.d links... "
update-rc.d snf-ganeti-eventd defaults
echo "done\n"
echo "Starting snf-ganeti-eventd...\n"
/etc/init.d/snf-ganeti-eventd start
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# prerm script for snf-image-host
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
echo "Stopping snf-ganeti-eventd...\n"
/etc/init.d/snf-ganeti-eventd stop
echo "Removing rc.d links... "
update-rc.d snf-ganeti-eventd remove
echo "done\n"
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment