Cron for Dynamic DNS Updating

I use my commercial host, Ionos, for websites, including creating subdomains for ones I’m hosting at home. However, I don’t pay for a static ip. I was using a Windows Scheduled Task to curl the necessary URLs to keep the IP updated, but I’m switching everything I can over to Linux, and a Pi.

Start by creating your .sh file and making it executable. I created dnsupdate.sh in my home dir on my Pi, and populated it with my curl calls. I did this via Nano. Then make it executable:

Then I fired up cron by entering:

It’s going to ask you for an editor on first use. I say, stick with Nano.

After this it will present you with a crontab file. Scroll to the bottom and enter:

This will run your sh file every hour at the top of the hour.

Save the file.

If you want to see what’s up with Cron, enter:

If it’s running, it’ll show you the files – your sh file – in use by cron.

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">