My server uses DNSPod, and since its IP address is dynamic, I need DDNS.
I use a shell-script-based DDNS program that implements DDNS through DNSPod's standard API. I've forgotten the program
Previously, I used corn to run it every 2 minutes.
Later, I used sleep to run it every two minutes.
But then I found that the process would disappear a few hours after each day's reboot…
After some trial and error, I solved the problem.
The problem was in the first line of rc.local:
#!/bin/sh -e
The “-e” option means “stop on error.” So, whenever the ping gets a little high and an error occurs, it stops.
The fix is simply to remove “-e.”