From f8806293be0df09b638345d2f3df98d73de435e4 Mon Sep 17 00:00:00 2001 From: kropotkin Date: Wed, 12 Jan 2022 20:50:30 +0100 Subject: [PATCH] remove useless loop --- lokinetfy.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lokinetfy.sh b/lokinetfy.sh index 299055d..c433ecb 100644 --- a/lokinetfy.sh +++ b/lokinetfy.sh @@ -66,10 +66,7 @@ function start_vpn() { while ! ip netns exec lokins ip a show dev lokitun0 up 2>/dev/null >/dev/null; do sleep .5 done - exitdotloki=$(host exit.loki | grep handled | cut -d' ' -f7 | sed -e 's/\.$//') - while [[ $(ip netns exec lokins lokinet-vpn --status) != "::/0 via $exitdotloki" ]] ; do - ip netns exec lokins lokinet-vpn --up --exit $exitdotloki - done + ip netns exec lokins lokinet-vpn --up --exit exit.loki 2>/dev/null } case "$1" in @@ -83,4 +80,4 @@ case "$1" in echo "Syntax: $0 run|start|stop" exit 1 ;; -esac \ No newline at end of file +esac