Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu: ./virtualhost.sh: 418: [: missing ] #16

Open
BjornW opened this issue Aug 1, 2012 · 5 comments
Open

Ubuntu: ./virtualhost.sh: 418: [: missing ] #16

BjornW opened this issue Aug 1, 2012 · 5 comments

Comments

@BjornW
Copy link

BjornW commented Aug 1, 2012

Needs more info, but I get ./virtualhost.sh: 418: [: missing ]
when running on Ubuntu Server 12.04.

@ghost ghost assigned BjornW Aug 1, 2012
@jarl-dk
Copy link

jarl-dk commented Jun 26, 2013

Same here

@jarl-dk
Copy link

jarl-dk commented Jun 26, 2013

I believe it is because My home dir is crypted with ecrypt-fs but I am not sure.

@jarl-dk
Copy link

jarl-dk commented Jun 26, 2013

So I was wrong about my home dir being encrypted a PR has been provided to solve the issue.

@pgib
Copy link
Contributor

pgib commented Aug 22, 2013

Re: https://github.com/pgib/virtualhost.sh/blob/ubuntu/virtualhost.sh#L418

This should be fixed by doing:

if [ "$CREATE_INDEX" == 'yes' ]; then

However, a better solution is to make use of the checkyesno function: https://github.com/pgib/virtualhost.sh/blob/master/virtualhost.sh#L343

Then you can just have:

if ! checkyesno ${CREATE_INDEX}; then

@jarl-dk
Copy link

jarl-dk commented Aug 22, 2013

OK. I see that both works for bash: http://tldp.org/LDP/abs/html/comparison-ops.html

But maybe you can revert to #!/bin/sh when using single =. == is probably a bash specific optional syntax.

Jarl

@BjornW BjornW removed their assignment Aug 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants