Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 810  / 1 Year ago, sat, january 21, 2023, 12:47:14

I have a dynamic DNS script as follows:



#!/bin/bash
curl -kL# "http://example.com/updatedns.php"
echo $? >> /var/log/ddns


...saved to /usr/local/bin/ddns. Obviously the URL above isn't the one I actually use, but the URL is meant to set the A record of my domain to the IP of the machine that requested it. I have confirmed it has been chmodded and runs from the command line, however, Upstart, which has been set up with the following script:



start on network started
exec /usr/local/bin/ddns


...doesn't execute it when the network starts (which I'm assuming is when the machine is booted or I connect the network cord).



I googled start on network started and found some results saying that this stanza doesn't actually get started properly, but still gets triggered, however I'm not sure if that's related or not. Am I doing something wrong? I'm running Ubuntu Server 11.10.


More From » server

 Answers
0
grep 'emit' /etc/network/if-up.d/upstart -a5


Suggests you should probably use start on net-device-up.



If you have more than one det device (and all don't have gateways), you can add an argument on the end like so:



start on net-device-up IFACE=eth0

[#41097] Sunday, January 22, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eighethod

Total Points: 358
Total Questions: 112
Total Answers: 119

Location: Cayman Islands
Member since Fri, Mar 4, 2022
2 Years ago
;