I'd like to run a command at startup which pings a certain address every 10 minutes and writes the result to a file. I've figured out now how to do the pinging and file writing and the 10 min intervals:
while true; do my-command-here; sleep 600; done
My question is, can I put this in
/etc/init.d/rc.local or should I be putting it in
/etc/rc.local or somewhere else entirely? I'm specifically concerned because it's an infinite loop so I'm not sure if I could put it in one of these startup scripts.
Some help would be appreciated. I'm using Ubuntu 12.04.5