Use return code
Signed-off-by: Pluggi <pluggi512@gmail.com>
This commit is contained in:
parent
336a394009
commit
1498c44063
@ -64,7 +64,7 @@ class Wireguard(IntervalModule):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
command_result = run_through_shell(self.status_command % {'vpn_name': self.vpn_name})
|
command_result = run_through_shell(self.status_command % {'vpn_name': self.vpn_name})
|
||||||
self.connected = command_result.out.strip() == "active"
|
self.connected = command_result.rc == 0
|
||||||
|
|
||||||
if self.connected:
|
if self.connected:
|
||||||
color, status = self.color_up, self.status_up
|
color, status = self.color_up, self.status_up
|
||||||
|
Loading…
Reference in New Issue
Block a user