I was prompted with this error when i am trying to run discourse-setup file:
./discourse-setup: line 481: syntax error near unexpected token `else'
./discourse-setup: line 481: ` else'
Oddly enough, i did exactly the same guide from github a few days ago and it worked perfectly.
My server is a 2GB RAM server on Ubuntu 16.04 from Vultr.
Please note, i have tried this on various servers but it didn’t work :-s Not sure what i did wrong tbh.
Thanks in advance guys.
just in case this actually make any difference, the reason that i reinstall Discourse is because i just finished the full verification from mailgun today.
To save myself from trouble, i am trying to reinstall everything.
It’s from a recent commit, I’ve submitted a PR here
I’m not sure if that’s desired direction for the fix
Oh it seems this only happens today, as i checked the discourse-setup file it seems it is related to letsencrypt set up.
My set up a few days ago was 100% smooth with 0 error, so i guess you are right
PR merged; thanks @watchmanmonitor.
Sorry my bad, I wanted to remove some extra verboseness that @pfaffman added (we don’t need to be notified of every single expected default) and I did not realize an empty if then statement was not allowed in bash. Thanks for the fix.