mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-05 13:10:27 +00:00
rename pve-manager.service to pve-guests
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>
This commit is contained in:
parent
e5ea71e1b9
commit
57de747b0c
@ -3,7 +3,6 @@ include ../../defines.mk
|
||||
all:
|
||||
|
||||
SCRIPTS = \
|
||||
pve-manager \
|
||||
pvedaemon \
|
||||
pveproxy \
|
||||
spiceproxy \
|
||||
@ -14,7 +13,7 @@ SERVICES= \
|
||||
pvebanner.service \
|
||||
pvenetcommit.service \
|
||||
pvestatd.service \
|
||||
pve-manager.service \
|
||||
pve-guests.service \
|
||||
pvedaemon.service \
|
||||
pveproxy.service \
|
||||
spiceproxy.service \
|
||||
|
@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=PVE VM Manager
|
||||
Description=PVE guests (Service providing start-on-boot and stop-all-on-shutdown)
|
||||
ConditionPathExists=/usr/bin/pvesh
|
||||
RefuseManualStart=true
|
||||
RefuseManualStop=true
|
||||
@ -16,7 +16,7 @@ After=lxc.service
|
||||
After=pve-ha-crm.service pve-ha-lrm.service
|
||||
|
||||
[Service]
|
||||
Environment="PVE_LOG_ID=pve-manager"
|
||||
Environment="PVE_LOG_ID=pve-guests"
|
||||
ExecStart=/usr/bin/pvesh --nooutput create /nodes/localhost/startall
|
||||
ExecStop=-/usr/bin/vzdump -stop
|
||||
ExecStop=/usr/bin/pvesh --nooutput create /nodes/localhost/stopall
|
||||
@ -26,3 +26,4 @@ TimeoutSec=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=pve-manager.service
|
@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: pve-manager
|
||||
# Required-Start: $remote_fs pveproxy qemu-server pvestatd
|
||||
# Required-Stop: $remote_fs pveproxy qemu-server pvestatd
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: PVE VM Manager
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin
|
||||
PVESH=/usr/bin/pvesh
|
||||
|
||||
test -f $PVESH || exit 0
|
||||
|
||||
PVE_LOG_ID=pve-manager
|
||||
export PVE_LOG_ID
|
||||
|
||||
# Include defaults if available
|
||||
if [ -f /etc/default/pve-manager ] ; then
|
||||
. /etc/default/pve-manager
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ "$START" = "no" ]; then
|
||||
exit 0
|
||||
fi
|
||||
echo "Starting VMs and Containers"
|
||||
pvesh --nooutput create /nodes/localhost/startall
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping running Backup"
|
||||
vzdump -stop
|
||||
echo "Stopping VMs and Containers"
|
||||
pvesh --nooutput create /nodes/localhost/stopall
|
||||
;;
|
||||
reload|restart|force-reload)
|
||||
# do nothing here
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
3
debian/postinst
vendored
3
debian/postinst
vendored
@ -52,6 +52,7 @@ case "$1" in
|
||||
# remove old/usused init.d files
|
||||
rm -f /etc/init.d/pvebanner
|
||||
rm -f /etc/init.d/pvenetcommit
|
||||
rm -f /etc/init.d/pve-manager
|
||||
|
||||
# create new daily randomize update cronjob if not exist
|
||||
MIN="$(shuf -i 0-59 -n 1)"
|
||||
@ -110,7 +111,7 @@ EOF
|
||||
fi
|
||||
done
|
||||
|
||||
for service in pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-manager; do
|
||||
for service in pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-guests; do
|
||||
deb-systemd-helper unmask $service.service >/dev/null || true
|
||||
|
||||
# was-enabled defaults to true, so new installations run enable.
|
||||
|
2
debian/postrm
vendored
2
debian/postrm
vendored
@ -22,7 +22,7 @@ esac
|
||||
# same as dh_systemd_enable (code copied)
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
|
||||
PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-manager"
|
||||
PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-guests"
|
||||
PVETIMERS="pvesr"
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user