b/postrm: let debhelper generate systemd stuff
With #DEBHELPER# the manual maintained code will be autogenerated, no need to manually track which services and timers this packages has. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3877d4bff5
commit
3fde056435
34
debian/postrm
vendored
34
debian/postrm
vendored
@ -19,36 +19,4 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# same as dh_systemd_enable (code copied)
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
|
||||
PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-guests"
|
||||
PVETIMERS="pvesr"
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
for timer in ${PVETIMERS}; do
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper mask $timer.timer >/dev/null
|
||||
fi
|
||||
done
|
||||
for service in ${PVESERVICES}; do
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper mask $service.service >/dev/null
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$1" = purge ]; then
|
||||
for timer in ${PVETIMERS}; do
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper purge $timer.timer >/dev/null
|
||||
deb-systemd-helper unmask $timer.timer >/dev/null
|
||||
fi
|
||||
done
|
||||
for service in ${PVESERVICES}; do
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper purge $service.service >/dev/null
|
||||
deb-systemd-helper unmask $service.service >/dev/null
|
||||
fi
|
||||
done
|
||||
fi
|
||||
#DEBHELPER#
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -10,4 +10,4 @@ override_dh_fixperms:
|
||||
dh_fixperms -Xpvemailforward -Xvar/log/pveproxy
|
||||
|
||||
%:
|
||||
dh $@
|
||||
dh $@ --with=systemd
|
||||
|
Loading…
x
Reference in New Issue
Block a user