Closed C0rwen closed 3 years ago
Any ideas ?
Windows style newline characters? Save with correct end of line encoding, see https://unix.stackexchange.com/questions/391223/why-am-i-getting-line-1-r-command-not-found
@C0rwen, I agree with @DummerJunge: this looks like an issue with line endings. How did you configure the script to run?
dos2unix
https://www.rdocumentation.org/packages/icesTAF/versions/3.6.0/topics/dos2unix
AFAIK not OOB on a Syno NAS
Yeah true, better to make sure that you use scp or in case of (s)ftp do a binary copy
Yeah true, better to make sure that you use scp or in case of (s)ftp do a binary copy
Or ssh, change dir and wget https://raw.githubusercontent.com/ianharrier/synology-scripts/master/reconnect-vpn.sh
May use Download Station ...
I'm going to close this, as it doesn't appear to be an issue with the script itself.
Thank you for you help. It was a issue with end of line. With a wget it's better
Hello.
I try to execute this script on my Synology NAS DS920+. My version of DSM is DSM 6.2.4-25556
I have this error on the execution
reconnect-vpn.sh: line 13: $'\r': command not found reconnect-vpn.sh: line 17: $'\r': command not found reconnect-vpn.sh: line 23: $'\r': command not found reconnect-vpn.sh: line 27: $'\r': command not found reconnect-vpn.sh: line 30: $'\r': command not found reconnect-vpn.sh: line 33: $'\r': command not found reconnect-vpn.sh: line 37: syntax error near unexpected token `elif'
'econnect-vpn.sh: line 37: `elif [[ $CONFIGS_QTY -gt 1 ]]; then
Someone can help me ?
Have a nice day