Skip to content

Instantly share code, notes, and snippets.

@robshep
Created January 11, 2014 14:46
Show Gist options
  • Save robshep/8371754 to your computer and use it in GitHub Desktop.
Save robshep/8371754 to your computer and use it in GitHub Desktop.
Expect script to get OpenVPN status
#!/usr/bin/expect
set timeout 20
# I have the management server at tcp:localhost:1194
spawn telnet localhost 1194
expect ">INFO:OpenVPN Management Interface Version 1*"
send "status\n"
expect "END"
send "exit\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment