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

$'\r': command not found #12

Closed
vankhon opened this issue May 3, 2020 · 2 comments
Closed

$'\r': command not found #12

vankhon opened this issue May 3, 2020 · 2 comments

Comments

@vankhon
Copy link

vankhon commented May 3, 2020

Hi, I enabled SNMP Services and set community to public.

After running the script, i get this error:
/volume1/homes/jan/grafana.sh: line 2: $'\r': command not found
/volume1/homes/jan/grafana.sh: line 5: $'\r': command not found
/volume1/homes/jan/grafana.sh: line 15: $'\r': command not found
/volume1/homes/jan/grafana.sh: line 18: $'\r': command not found
/volume1/homes/jan/grafana.sh: line 23: $'\r': command not found
/volume1/homes/jan/grafana.sh: line 30: $'\r': command not found
/volume1/homes/jan/grafana.sh: line 69: syntax error near unexpected token elif' /volume1/homes/jan/grafana.sh: line 69: elif [[ $line == SYNOLOGY-SYSTEM-MIB::upgradeAvailable.0* ]]; then'

Theres no content in the InfluxDB

@kernelkaribou
Copy link
Owner

kernelkaribou commented Jul 30, 2020

Given the error, I believe this may have to do with how the file was saved. Looks like the application used may have inserted control characters that are being interpreted by bash. When you consider that lines such as #2 and #5 are empty lines of the script. If you look up the error there are many different suggestions on cleaning this up either in an editor or if anything do a git pull of the file or even a wget of the raw file itself.

wget https://raw.githubusercontent.com/kernelkaribou/synology-monitoring/master/synology_snmp.sh

@kernelkaribou
Copy link
Owner

Issue is on file formatting and not script, closing.

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

2 participants