-
When running the script I get: wrong # args: should be "while test command" while executing "while { expect "Password:" { stty -echo expect_user -re "(.*)\n" send "$expect_out(1,string)\n" stty echo expect "Are you OK with..." (file "./ssl-renewal.ex" line 20)
On line 20 of ssl-renew there is only "while true {" Could you help debug this? Thanks in advance ;)
-
Interesting. I've not seen this error before. Can you confirm the version of expect and OS you are using? My only other thought it that line 19
"Are you OK with your IP being logged?" { send "y\r" }
is a continuation of line 18, hence line 18 must end with\
with no trailing characters. -
The only thing I can see, is that on line 11, it should read
while true {
and in your initial comment thetrue
is missing.You wrote:
When running the script I get: wrong # args: should be "while test command" while executing "while { expect "Password:" { stty -echo expect_user -re "(.*)\n" send
and the code in that section should be
while true { expect "Password:" { stty -echo expect_user -re "(.*)\n" send "$expect_out(1,string)\n" stty echo expect "Are you OK with your IP being logged?" { send "y\n" } } \ "Are you OK with your IP being logged?" { send "y\r" } ```
-
Thanks for creating this script!
Unfortunately I'm getting the same error.
spawn certbot certonly --config certbot.ini -a manual --debug wrong # args: should be "while test command" while executing "while true { expect "Password:" { stty -echo expect_user -re "(.*)\n" send "$expect_out(1,string)\n" stty echo expect "Are you OK ..." (file "ssl-renewal.ex" line 11)
Edited by Jordy van Dortmont -
Hey, apologies for basically dropping this. Day job got in the way. In the mean time, I've figured out a better, simpler way to automate certbot without resorting to convoluted expect scripts.
Please register or sign in to comment