Last active
June 17, 2025 05:28
-
-
Save tshipenchko/b109fbb422a76f55d01e6f02142ba6fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo true | |
setup_routes() { | |
sleep 1 | |
if ip route show 10.10.10.0/24 | grep -v ppp0 >/dev/null 2>&1; then | |
sudo ip route del 10.10.10.0/24 dev ppp0 | |
echo "Setup routes" | |
fi | |
} | |
setup() { | |
setup_routes | |
true | |
} | |
(while true; do | |
ip link show ppp0 >/dev/null 2>&1 && setup && break | |
sleep 1 | |
done) & | |
echo "password" | head -n1 | sudo openfortivpn ip:port --set-dns=0 --username=login $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment