Skip to content

Instantly share code, notes, and snippets.

@wieshka
Created January 6, 2020 08:18
Show Gist options
  • Save wieshka/565f774f9a319be092bc5c1085e60673 to your computer and use it in GitHub Desktop.
Save wieshka/565f774f9a319be092bc5c1085e60673 to your computer and use it in GitHub Desktop.
wowza-expect
#!/usr/bin/expect -f
set timeout -1
spawn sudo /tmp/WowzaStreamingEngine-4.7.8-linux-x64-installer.run
match_max 100000
expect {
-exact "Press \[Enter\] to continue:" { send -- "\r"; exp_continue }
-ex "Do you accept this agreement? \[y/n\]: "
}
send -- "y\r"
expect -exact "License Key: \[\]: "
send -- "KEY\r"
expect -exact "User Name: \[\]: "
send -- "USER\r"
expect -exact "Password: :"
send -- "PASSWORD\r"
expect -exact "Confirm Password: :"
send -- "PASSWORD\r"
expect -exact "Start Wowza Streaming Engine automatically \[Y/n\]: "
send -- "y\r"
expect -exact "Do you want to continue? \[Y/n\]: "
send -- "y\r"
expect eof
@wieshka
Copy link
Author

wieshka commented Jan 6, 2020

If needed, you can use $::env(ENV_VARIABLE_NAME) to fill answers from environment variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment