<<< Replacing DynDNS with Route 53
Automating the Process
All daemons, or cron jobs, in OSX are run and controled by the launchd process, which is in turn controlled by launchctl
At boot time the root launchd process will scan the daemon directories /System/Library/LaunchDaemons and /Library/LaunchDaemons for job definitions and load them depending on the existence/value of the Disabled key and the contents of the override database.
The launchd process runs a number of different jobs, depending on where you place the config file
Type | Location | Run on behalf of |
---|---|---|
User Agents | ~/Library/LaunchAgents | Currently logged in user |
Global Agents | /Library/LaunchAgents | Currently logged in user |
Global Daemons | /Library/LaunchDaemons | root or the user specified with the key User |
System Agents | /System/Library/LaunchAgents | Currently logged in user |
System Daemons | /System/Library/LaunchDaemons | oot or the user specified with the key User |
As we want DynDNS to run periodically so we need to create a Global Daemon. If you want to work this out for yourself there are some excellent tutorials on the MAC developers website
If you just want it to work then follow these steps.
- Create a directory somewhere on your server
- I put mine on the same drive as my website, but in a protected directory
- Download and copy these files to that directory
- Then edit all of the files so that they point to the directory where you put the downloaded files
- Adjust runtime frequency in com.asm.dyndns.plist
- By default this is set to 30 minutes
- Change the StartInterval to a new value if required; Note that this is measured in seconds
- Once all the files are modified
- Copy com.asm.dyndns.plist into /Library/LaunchDaemons
- Run StartDynDNS
- Run CheckDynDNS to test
- the output should look something like this
$ ./CheckDynDNS Password: { "LimitLoadToSessionType" = "System"; "StandardErrorPath" = "/Library/Logs/DynDNS_error.log"; "Label" = "com.asm.dyndns"; "TimeOut" = 30; "OnDemand" = true; "LastExitStatus" = 0; "Program" = "/Groups/revitt/Daemons/DynDNS.sh"; "ProgramArguments" = ( "/Groups/revitt/Daemons/DynDNS.sh"; ); };