Replaced ifconfig (no longer installed in base image) by ip.

This commit is contained in:
yohan 2019-12-05 18:49:59 +01:00
parent e993fd44d4
commit 96b3e8f5c8

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
function openvpn_is_dead() { function openvpn_is_dead() {
ping -n 8.8.8.8 -c 1 -w 3 >/dev/null 2>&1 && ifconfig tun0 >/dev/null 2>&1 ping -n 8.8.8.8 -c 1 -w 3 >/dev/null 2>&1 && ip addr show dev tun0 >/dev/null 2>&1
r=$((! $? )) r=$((! $? ))
return $r return $r
} }