Skip to content

Commit

Permalink
Bugfix: Suppress output for VPN service connect/disconnect for Asuswr…
Browse files Browse the repository at this point in the history
…t-merlin
  • Loading branch information
1951FDG committed Apr 2, 2021
1 parent 552d4df commit fa1fa5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openpyn/asus.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def connect(unit, test=False):
try:
pprint("/bin/pidof" + " " + argument1)
if not test:
process = subprocess.run(["/bin/pidof", argument1])
process = subprocess.run(["/bin/pidof", argument1], stdout=subprocess.DEVNULL)
if process.returncode == 0: # Connected
return
pprint("/sbin/service" + " " + argument2)
Expand All @@ -135,7 +135,7 @@ def disconnect(unit, test=False):
try:
pprint("/bin/pidof" + " " + argument1)
if not test:
process = subprocess.run(["/bin/pidof", argument1])
process = subprocess.run(["/bin/pidof", argument1], stdout=subprocess.DEVNULL)
if process.returncode == 1: # Disconnected
return
pprint("/sbin/service" + " " + argument2)
Expand Down

0 comments on commit fa1fa5c

Please sign in to comment.