Line 481 error for ./discourse-setup


(Daily Shock) #1

Hey guys,

I was prompted with this error when i am trying to run discourse-setup file:

root@forum:/var/discourse# ./discourse-setup
./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.


(Daily Shock) #2

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.


(Allen - Watchman Monitoring) #3

It’s from a recent commit, I’ve submitted a PR here

I’m not sure if that’s desired direction for the fix


(Daily Shock) #4

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 :smiley:


(Matt Palmer) #5

PR merged; thanks @watchmanmonitor.


(Matt Palmer) #6

(Jeff Atwood) #7

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.