Skip to content

Instantly share code, notes, and snippets.

@WallaceTan
Last active July 10, 2022 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WallaceTan/61eab5280893e4c4ac36386de6b63d8c to your computer and use it in GitHub Desktop.
Save WallaceTan/61eab5280893e4c4ac36386de6b63d8c to your computer and use it in GitHub Desktop.
/jffs/openvpn/start-openvpn-client.sh
#!/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