# Clusev update-sentinel — path unit (HOST-side).
#
# Watches for the update sentinel the dashboard writes (Versions → "Jetzt aktualisieren")
# and triggers clusev-update.service the moment it appears. Install this unit and
# clusev-update.service into /etc/systemd/system/, then:
#
#   systemctl daemon-reload
#   systemctl enable --now clusev-update.path
#
# Adjust PathExists= if your project lives somewhere other than /home/nexxo/clusev (it must
# match the ./run bind mount in docker-compose.prod.yml). install.sh rewrites this for you.
[Unit]
Description=Clusev update sentinel — watch for a dashboard update request
After=docker.service
Wants=docker.service

[Path]
# Fires the .service whenever this file exists. The service consumes the sentinel before
# running update.sh, so a persistent update failure cannot loop here.
PathExists=/home/nexxo/clusev/run/update.request
Unit=clusev-update.service

[Install]
WantedBy=multi-user.target
