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

[Bug] setup-gateway.sh failed. #572

Closed
wushilin opened this issue Sep 19, 2022 · 1 comment
Closed

[Bug] setup-gateway.sh failed. #572

wushilin opened this issue Sep 19, 2022 · 1 comment
Assignees
Labels
bug Something isn't working P2
Milestone

Comments

@wushilin
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior on Ubuntu 22:

  1. curl -fsSL https://get.casaos.io | bash

Expected behavior
Installation successful

Actual Behavior
[ INFO ] Running /tmp/casaos-installer/tmp.bVxXF2APij/build/scripts/setup/script.d/01-setup-gateway.sh...
🟩 Running setup-gateway.sh...
/tmp/casaos-installer/tmp.bVxXF2APij/build/scripts/setup/service.d/gateway/ubuntu/jammy/setup-gateway.sh (line 14): Missing end to balance this if statement
if [ ! -f "${CONF_FILE}" ]; then
^
warning: Error while reading file /tmp/casaos-installer/tmp.bVxXF2APij/build/scripts/setup/service.d/gateway/ubuntu/jammy/setup-gateway.sh

🟥 setup-gateway.sh failed.

Root cause:

#cat /tmp/casaos-installer/tmp.bVxXF2APij/build/scripts/setup/service.d/gateway/ubuntu/jammy/setup-gateway.sh
...
if [ ! -f "${CONF_FILE}" ]; then \ <= This is extra
echo "Initializing config file..."
cp -v "${CONF_FILE_SAMPLE}" "${CONF_FILE}"; \ <= This is extra
fi
...

@wushilin wushilin added the bug Something isn't working label Sep 19, 2022
@wushilin
Copy link
Author

Actually not the root cause.

The root cause is that I am not using bash. Your script referred $SHELL but that is not correct.

The root cause is that you assume everyone uses bash as shell. I have to chsh to bash to run it.

Can you replace $SHELL with bash path? Because not everyone is using bash...

@tigerinus tigerinus added this to the vNext milestone Oct 21, 2022
tigerinus added a commit to IceWhaleTech/CasaOS-Gateway that referenced this issue Oct 21, 2022
tigerinus added a commit to IceWhaleTech/CasaOS-UserService that referenced this issue Oct 21, 2022
@tigerinus tigerinus modified the milestones: vNext, v0.3.8 Oct 21, 2022
mojothemonkey2 pushed a commit to mojothemonkey2/CasaOS that referenced this issue Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
Archived in project
Development

No branches or pull requests

6 participants