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

./install.sh: /opt/YAMon4/includes/getlatest.sh: line 2: syntax error: unexpected newline #45

Open
benisai opened this issue Jul 30, 2023 · 2 comments

Comments

@benisai
Copy link

benisai commented Jul 30, 2023


Installing YAMon...

./install.sh: /opt/YAMon4/includes/getlatest.sh: line 2: syntax error: unexpected newline
root@GL-AXT1800:/opt#


root@GL-AXT1800:/opt# cat /opt/YAMon4/includes/getlatest.sh

<title>302 Found</title>

Found

The document has moved here.

@Seekatar
Copy link

I got past that by

  1. Edit install.sh and adding -L to curl to have it follow the redirect.
  2. Then you get a valid getlastest.sh, but you'll get another error since it also need -L on its curl.
  3. Edit getlastest.sh to add -L to curl
  4. Comment out getting getlastest.sh in install.sh and you should get farther.

@EdCallahan
Copy link

EdCallahan commented Nov 22, 2023

I didn't see this option before I found my workaround, which worked for me. In install.sh I edited the line:

    baseurl='http://usage-monitoring.com'

to

    baseurl='https://usage-monitoring.com'

Then after the line:

    sed -i -e 's/\r$//' "$dst" #change windows linefeeds to unix

I added:

    sed -i -e 's/http:/https:/' "$dst"

The http calls are being redirected to https. These edits avoid the redirects and calls the https pages directly.

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