mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-09 04:56:13 +00:00

the name 'pve-manager' collides with our pve-manager package name, which - from the user point of view - provides mainly the API and WebUI. An user could thus think that restarting 'pve-manager' would restart the WebUIs server, which is relatable. But, the pve-manager.service does not controls the WebUI or its server but is responsible for starting all guest with 'onboot=1' in their config on system boot and to stop all remaining running guests on system shutdown. Thus rename it to pve-guests and adapt its description. This may not seem as ideal name at first glance, but its better than the current option. Further it leads to log messages like: > Starting PVE guests (Service providing start-on-boot and stop-all-on-shutdown) > [...] > Started PVE guests (Service providing start-on-boot and stop-all-on-shutdown) > [...] > Stopping PVE guests (Service providing start-on-boot and stop-all-on-shutdown) which makes it clearer what happens, or what this service is for. Alias the new service to the old pve-manager.service for legacy reasons. While our services do not depend on it an user could have made an own service which used pve-manager.service as synchronisation point. Linitian then complains about init.d/pve-manager not having a related systemd service file. Instead of renmaning it just drop it. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
55 lines
1.3 KiB
Bash
Executable File
55 lines
1.3 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
# Abort if any command returns an error value
|
|
set -e
|
|
|
|
case "$1" in
|
|
purge)
|
|
rm -rf /var/log/pveproxy
|
|
rm -rf /var/lib/pve-manager
|
|
;;
|
|
|
|
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
|
rm -f /etc/cron.d/pveupdate
|
|
;;
|
|
|
|
*)
|
|
echo "postrm called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
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
|