I have following expect file:
spawn ./SpeedVPN.sh [lindex $argv 0]
expect "password for user:"
send "123456789\r"
expect "Enter 'yes' to accept, 'no' to abort; anything else to view:"
send "yes\r"
expect "Username:"
send "vpnUserName\r"
expect "Password:"
send "vpnPassword\r"
expect "Established DTLS connection"
spawn ./ChangeMTU.sh 1300
expect "password for user:"
send "123456789\r"
interact
After the first spawn is done, I want to leave the opened VPN process running and meanwhile, I want to change the MTU. But when I spawn the next .sh
file in the middle, it closes the VPN process which was opened by the first spawn and runs the second .sh
file.
What should I do?