# Line 481 error for ./discourse-setup

**URL:** https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926
**Category:** Self-hosting
**Created:** [2017年三月27日 01:53 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926 "2017-03-27T01:53:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Daily\_SHOCK](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Daily\_SHOCK](https://meta.discourse.org/u/Daily_SHOCK)
#### Post date: [2017年三月27日 01:53 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/1 "2017-03-27T01:53:00Z")

</div>

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](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) 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.

---

<div class="post-metadata">

### Author: ![Daily\_SHOCK](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Daily\_SHOCK](https://meta.discourse.org/u/Daily_SHOCK)
#### Post date: [2017年三月27日 01:56 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/2 "2017-03-27T01:56:08Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [2017年三月27日 02:04 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/3 "2017-03-27T02:04:02Z")

</div>

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

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

[https://github.com/discourse/discourse\_docker/pull/342](https://github.com/discourse/discourse_docker/pull/342)

---

<div class="post-metadata">

### Author: ![Daily\_SHOCK](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Daily\_SHOCK](https://meta.discourse.org/u/Daily_SHOCK)
#### Post date: [2017年三月27日 02:07 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/4 "2017-03-27T02:07:29Z")

</div>

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 😃

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [2017年三月27日 02:21 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/5 "2017-03-27T02:21:46Z")

</div>

PR merged; thanks @watchmanmonitor.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [2017年三月27日 02:21 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/6 "2017-03-27T02:21:53Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年三月27日 05:32 UTC](https://meta.discourse.org/t/line-481-error-for-discourse-setup/59926/7 "2017-03-27T05:32:59Z")

</div>

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.
