fix(stacks): show correct status when backup service has failed

Same fix as the update service: gate "not installed" on unit file
existence rather than systemctl exit code, which is non-zero for
failed services too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 02:21:44 +02:00
co-authored by Claude Sonnet 4.6
parent 04a79ea198
commit a7a3fb8582
+5 -2
View File
@@ -664,8 +664,11 @@ EOF
;;
status)
systemctl status stacks-backup.timer stacks-backup.service --no-pager 2>/dev/null \
|| warn "Backup service not installed"
if systemctl cat stacks-backup.timer &>/dev/null; then
systemctl status stacks-backup.timer stacks-backup.service --no-pager 2>/dev/null || true
else
warn "Backup service not installed"
fi
;;
logs)