diff --git a/entrypoint.sh b/entrypoint.sh index 1bc1471c..fff58fb6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 ############################################