Only rely on ping-check, reduce wait time for down vpn
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fc30629496
commit
6b9a58aa25
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ import yaml
|
|||
|
||||
def check_ping_reachable(ip):
|
||||
try:
|
||||
subprocess.check_call(['ping', '-c2', ip],
|
||||
subprocess.check_call(['ping', '-c2', '-W1', ip],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL)
|
||||
return True
|
||||
|
@ -31,7 +31,7 @@ def main():
|
|||
results = [config['prefix']]
|
||||
|
||||
for check in config['checks']:
|
||||
if check_service_active(check['service']) and check_ping_reachable(check['ip']):
|
||||
if check_ping_reachable(check['ip']):
|
||||
check['color'] = config['colors']['success']
|
||||
else:
|
||||
check['color'] = config['colors']['failure']
|
||||
|
|
Loading…
Add table
Reference in a new issue