Created
January 11, 2014 14:46
-
-
Save robshep/8371754 to your computer and use it in GitHub Desktop.
Expect script to get OpenVPN status
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
#!/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