Skip to content

Commit

Permalink
Handle newline in response from systemctl is-active
Browse files Browse the repository at this point in the history
  • Loading branch information
bwarden committed Sep 15, 2022
1 parent 21036a2 commit 5b1503c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/clr-network-troubleshooter.in
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ sub check_proxies_reachable {
log_warning("PAC file not loaded by system");
add_action("Restart pacdiscovery (sudo systemctl restart pacdiscovery)");
}
elsif (`systemctl is-active pacrunner` ne 'active'
|| `systemctl is-active pacdiscovery` ne 'active') {
elsif (`systemctl is-active pacrunner` !~ /^active$/
|| `systemctl is-active pacdiscovery` !~ /^active$/) {
log_warning("not running: pacrunner and/or pacdiscovery");
add_action("Restart pacdiscovery (sudo systemctl restart pacdiscovery)");
}
Expand Down

0 comments on commit 5b1503c

Please sign in to comment.