*Hits head on desk* Thank you that's fixed it I had UTF-8 encoding but I didn't have the EOL set to UNIX I thought it was set by default but never checked it.
Thank you for helping to solve this.
No it's connected through the WAN port to my modem with a public IP address. Yes I'm signed up with afraid and have unique key which I've gotten working temporarily with my PC by using the Direct URL link.
It returns the script minus the fi line at the end and no I couldn't find any information on whether it should or shouldn't have a .sh file extension so as the wiki didn't specify it and you generally don't use them on linux for scripts I didn't.
Yup both are set. When I uploaded the script to the router again after checking it I forgot to change the rights for the file (when I went to run it manually) but after I did the router couldn't find the file:
admin@N66U:/jffs/scripts# ./ddns-start
-sh: ./ddns-start: Permission denied...
Thanks for the reply, scrip (my key where KEY is):
#!/bin/sh
curl -k "https://freedns.afraid.org/dynamic/update.php?KEY" >/dev/null 2>&1 &
if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi
Path is /jffs/scripts/ddns-start
Sorry to revive thread but it's the exact problem I am having though I have the updated script with the correct syntax (as listed in the wiki) and I get the same error.
I've followed the steps provided and I have a ddns-start script on my router (n66) though I'm not able to run the script...