mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 19:02:31 +00:00
fix(monitor): write Proxmox's notification settings only while /etc/pve is mounted
- Nothing is written under /etc/pve unless it is the mounted cluster filesystem; a Monitor that starts while pve-cluster is being restarted waits for it and registers its webhook afterwards. - The Monitor service is ordered after pve-cluster.service. - The settings are written only when they have to change. The copies taken before a change are kept in /usr/local/share/proxmenux/backups/pve-notifications, and the ones left in /etc/pve by earlier versions are moved there. - Uninstalling the Monitor removes its target and matcher from Proxmox. Reported in #427.
This commit is contained in:
@@ -496,7 +496,7 @@ update_monitor_service() {
|
||||
cat > "$MONITOR_SERVICE_FILE" << EOF
|
||||
[Unit]
|
||||
Description=ProxMenux Monitor - Web Dashboard (Beta)
|
||||
After=network.target
|
||||
After=network.target pve-cluster.service
|
||||
Before=shutdown.target reboot.target halt.target
|
||||
Conflicts=shutdown.target reboot.target halt.target
|
||||
|
||||
@@ -535,7 +535,7 @@ create_monitor_service() {
|
||||
cat > "$MONITOR_SERVICE_FILE" << EOF
|
||||
[Unit]
|
||||
Description=ProxMenux Monitor - Web Dashboard (Beta)
|
||||
After=network.target
|
||||
After=network.target pve-cluster.service
|
||||
Before=shutdown.target reboot.target halt.target
|
||||
Conflicts=shutdown.target reboot.target halt.target
|
||||
|
||||
|
||||
Reference in New Issue
Block a user