Commit 6579f45a authored by Dietmar Maurer's avatar Dietmar Maurer

add preinst script

Older versions of our daemona do not restart with HUP, so we
need to do a stop/start.
parent fde75c14
......@@ -43,6 +43,7 @@ ${DEB} deb:
install -m 0644 debian/conffiles dest/DEBIAN
install -m 0755 debian/config dest/DEBIAN
install -m 0644 debian/templates dest/DEBIAN
install -m 0755 debian/preinst dest/DEBIAN
install -m 0755 debian/postinst dest/DEBIAN
install -m 0755 debian/prerm dest/DEBIAN
install -m 0755 debian/postrm dest/DEBIAN
......
#!/bin/sh
set -e
DAEMONS="pveproxy spiceproxy pvestatd pvedaemon"
case "$1" in
install|upgrade)
old_version=$2
if [ ! -e /proxmox_install_mode ]; then
if dpkg --compare-versions "$old_version" lt '3.3-9' ; then
echo "Detected old pve-manager version - using stop/start to restart daemons"
for i in ${DAEMONS}; do
if [ -e "/usr/bin/$i" ]; then
/usr/bin/$i stop
fi
done
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
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