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:
1 parent
a08c5fca39
commit
04a79ea198
1 file changed
+5
-2
@@ -508,8 +508,11 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
status)
|
status)
|
||||||
systemctl status stacks-update.timer stacks-update.service --no-pager 2>/dev/null \
|
if systemctl cat stacks-update.timer &>/dev/null; then
|
||||||
|| warn "Update service not installed"
|
systemctl status stacks-update.timer stacks-update.service --no-pager 2>/dev/null || true
|
||||||
|
else
|
||||||
|
warn "Update service not installed"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
logs)
|
logs)
|
||||||
|
|||||||
Reference in new issue
Block a user