Skip to content

Commit

Permalink
chore: change if condition for CURRENT_STATE to use systemctl -q flag
Browse files Browse the repository at this point in the history
  • Loading branch information
HikariKnight committed Jun 26, 2024
1 parent 47648bb commit e899195
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/ublue-os-just/10-update.just
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ toggle-updates ACTION="prompt":
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
CURRENT_STATE="Disabled"
if systemctl is-enabled ublue-update.timer 2> /dev/null | grep -q enabled; then
if systemctl -q is-enabled ublue-update.timer; then
CURRENT_STATE="Enabled"
elif systemctl is-enabled rpm-ostreed-automatic.timer 2> /dev/null | grep -q enabled; then
elif systemctl -q is-enabled rpm-ostreed-automatic.timer; then
CURRENT_STATE="Enabled"
fi
OPTION={{ ACTION }}
Expand Down

0 comments on commit e899195

Please sign in to comment.