wget ip update is giving "can't open update?... : File exists" wget ip update is giving ...

Argomento: wget ip update is giving "can't open update?... : File exists"

Post wget ip update is giving "can't open update?... : File exists"
di Daniel Santos su domenica 23 aprile 2017

I'm using ddns to my home server and I want to update my ip using wget on my crontab.
For that I have a command on my crontab that is of the form:
*/5 * * * * sleep 15; wget "http://api.dynu.com/nic/update?username=USERNAME&password=MD5PASSWORD" . But I have notice that when I run the wget command the second time I get the a error:
"wget: can't open 'update?username=alexandre1985&password=pass': File exists".
1) Why does this happen?
2) What is the proper way of doing a wget from cron so it doesn't appear any error like this one?
Thank you

Daniel Santos

Rispondi con citazione | Segnalare
Post Re: wget ip update is giving "can't open update?... : File exists"
di rahsharma su domenica 23 aprile 2017

Daniel Santos wrote:I'm using ddns to my home server and I want to update my ip using wget on my crontab.
For that I have a command on my crontab that is of the form:
*/5 * * * * sleep 15; wget "http://api.dynu.com/nic/update?username=USERNAME&password=MD5PASSWORD" . But I have notice that when I run the wget command the second time I get the a error:
"wget: can't open 'update?username=alexandre1985&password=pass': File exists".
1) Why does this happen?
2) What is the proper way of doing a wget from cron so it doesn't appear any error like this one?
Thank you

Daniel Santos
Could you try using the -N parameter because that would allow it to overwrite the file which was downloaded the first time. Alternately, you could use the -nc parameter which would perform the HTTP request but not really download any existing file.

Rispondi con citazione | Segnalare
sabato 23 novembre 2024 20:03
Loading...