fix(stacks): show correct status when update service has failed
systemctl status exits non-zero for failed services (exit 3), not only missing ones (exit 4), causing the || warn branch to always fire after a failed run. Gate the "not installed" warning on whether the unit file exists instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -508,8 +508,11 @@ EOF
|
||||
;;
|
||||
|
||||
status)
|
||||
systemctl status stacks-update.timer stacks-update.service --no-pager 2>/dev/null \
|
||||
|| warn "Update service not installed"
|
||||
if systemctl cat stacks-update.timer &>/dev/null; then
|
||||
systemctl status stacks-update.timer stacks-update.service --no-pager 2>/dev/null || true
|
||||
else
|
||||
warn "Update service not installed"
|
||||
fi
|
||||
;;
|
||||
|
||||
logs)
|
||||
|
||||
Reference in New Issue
Block a user