beszel-agent-update.service: avoid non-zero exit status and add logging (#397)

This commit is contained in:
Henry Dollman
2025-01-14 20:31:50 -05:00
parent 73427306d1
commit 5d88599c9a

View File

@@ -393,7 +393,7 @@ Wants=beszel-agent.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/sh -c '/opt/beszel-agent/beszel-agent update | grep -q "Successfully updated" && systemctl restart beszel-agent' ExecStart=/bin/sh -c '/opt/beszel-agent/beszel-agent update | grep -q "Successfully updated" && (echo "Update found, restarting beszel-agent" && systemctl restart beszel-agent) || echo "No updates found"'
EOF EOF
# Create systemd timer for the daily update # Create systemd timer for the daily update