Last active
July 10, 2022 07:22
-
-
Save WallaceTan/61eab5280893e4c4ac36386de6b63d8c to your computer and use it in GitHub Desktop.
/jffs/openvpn/start-openvpn-client.sh
This file contains 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
#!/opt/bin/expect | |
set OTP [lindex $argv 0] | |
eval spawn /usr/sbin/openvpn --config /jffs/openvpn/client.ovpn --auth-user-pass /jffs/openvpn/client-credentials.txt | |
set prompt "CHALLENGE: Enter Authenticator Code" | |
interact -o -nobuffer -re $prompt return | |
send "$OTP\r" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment