Checks for TUN device to be opened (useful after a reboot)
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
printf "=== PIA CONTAINER ==="
|
||||
printf "\n ========================================="
|
||||
printf "\n ========================================="
|
||||
printf "\n ============= PIA CONTAINER ============="
|
||||
printf "\n ========================================="
|
||||
printf "\n ========================================="
|
||||
printf "\n == by github.com/qdm12 - Quentin McGaw ==\n"
|
||||
|
||||
cd /openvpn-$PROTOCOL-$ENCRYPTION
|
||||
|
||||
############################################
|
||||
# CHECK FOR TUN DEVICE
|
||||
############################################
|
||||
while [ "$(cat /dev/net/tun 2>&1 /dev/null)" != "cat: read error: File descriptor in bad state" ];
|
||||
do
|
||||
printf "\nTUN device is not opened, sleeping for 30 seconds..."
|
||||
sleep 30
|
||||
done
|
||||
printf "\nTUN device is opened"
|
||||
|
||||
############################################
|
||||
# ORIGINAL IP FOR HEALTHCHECK
|
||||
############################################
|
||||
|
||||
Reference in New Issue
Block a user