Improved agent install to complete even if the agent service cannot be started automatically.

This commit is contained in:
Kenneth Skovhede
2025-08-14 10:21:23 +02:00
parent 1efe727996
commit dc554472aa
2 changed files with 9 additions and 4 deletions
@@ -1,3 +1,8 @@
#!/bin/sh
systemctl enable duplicati-agent
systemctl start duplicati-agent
if ! command -v systemctl >/dev/null 2>&1; then
echo "Warning: systemctl not found. Service 'duplicati-agent' will not be enabled or started."
else
systemctl enable duplicati-agent || \
echo "Warning: Failed to enable duplicati-agent service."
systemctl start duplicati-agent || \
echo "Warning: Failed to start duplicati-agent service."
fi
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/sh
systemctl stop duplicati-agent
systemctl stop duplicati-agent 2>/dev/null || true
exit 0