diff --git a/README.md b/README.md index 606c37b49a0..54fe217d482 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,8 @@ The container is as simple as it can be, in order to reconnect automatically whe * `NET_IFACE` - Network Interface to bind the vpn (Useful when combined with `--network host` to protect the entire host). # Versions + * **2019.04.06** + - Fix reconnect mechanism [#28](https://github.com/bubuntux/nordvpn/issues/28). * **2019.03.12** - Remove HEALTH_CHECK. * **2019.03.09** diff --git a/hooks/post_checkout b/hooks/post_checkout index 0c9777a0bb7..1ea0beb9781 100644 --- a/hooks/post_checkout +++ b/hooks/post_checkout @@ -1,7 +1,7 @@ #!/bin/bash -DOCKER_VERSION=18.09.2 -DOCKER_MD5SUM=38e8e8db37bfb453a050ead4d447aaa3 +DOCKER_VERSION=18.09.4 +DOCKER_MD5SUM=17a327d2871874892b3b3d7532d7975c echo "**** Updating docker ****" curl "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz" | gunzip | tar -x --strip-components 1 docker/docker diff --git a/nordVpn.sh b/nordVpn.sh index 3df2315d32f..4b1ae43aff7 100755 --- a/nordVpn.sh +++ b/nordVpn.sh @@ -198,13 +198,18 @@ else firewall ovpn_dir=$(download_ovpn) - config_file=$(select_config_file ${ovpn_dir}) mkdir -p /dev/net [[ -c /dev/net/tun ]] || mknod -m 0666 /dev/net/tun c 10 200 - echo "Connecting $([[ -n ${OPENVPN_OPTS} ]] && echo "( ${OPENVPN_OPTS} )")... " - exec sg vpn -c "openvpn --config ${config_file} --auth-user-pass ${auth_file} --auth-nocache \ - --script-security 2 --up /etc/openvpn/up.sh --down /etc/openvpn/down.sh \ - ${OPENVPN_OPTS}" + while :; do + config_file=$(select_config_file ${ovpn_dir}) + echo "Connecting ... " + set -x + exec sg vpn -c "openvpn --config ${config_file} --auth-user-pass ${auth_file} --auth-nocache \ + --script-security 2 --up /etc/openvpn/up.sh --down /etc/openvpn/down.sh \ + ${OPENVPN_OPTS}" + set +x + sleep 1 + done fi \ No newline at end of file