add preinst script
Older versions of our daemona do not restart with HUP, so we need to do a stop/start.
This commit is contained in:
parent
fde75c1499
commit
6579f45ae1
1
Makefile
1
Makefile
@ -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
|
||||
|
31
debian/preinst
vendored
Normal file
31
debian/preinst
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
#!/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
|
Loading…
x
Reference in New Issue
Block a user