fix: event-trigger status reported rules: 0
eventer_status counted RULES but never populated it (eventer_read_rules was only called by run/config), so status always said 'rules: 0' even with rules present. Call eventer_read_rules before counting.
This commit is contained in:
@@ -301,6 +301,7 @@ eventer_disable() {
|
||||
eventer_status() {
|
||||
if [ -f "$USER_SYSTEMD_DIR/$EVENT_UNIT.timer" ] && systemctl --user show-environment >/dev/null 2>&1 \
|
||||
&& systemctl --user is-enabled "$EVENT_UNIT.timer" >/dev/null 2>&1; then
|
||||
eventer_read_rules
|
||||
local oncal next
|
||||
oncal="$(sed -n 's/^OnCalendar=//p' "$USER_SYSTEMD_DIR/$EVENT_UNIT.timer")"
|
||||
next="$(systemctl --user list-timers "$EVENT_UNIT.timer" --no-legend 2>/dev/null | awk '{print $1, $2}' | head -1)"
|
||||
|
||||
Reference in New Issue
Block a user