Hi morgon,
In that case I'd suggest to just write your own init script based on one of the templates I mentioned, or maybe the extensive /etc/init.d/skeleton if your system has it. Since an init script is just a shell script, you can do all your work there - in fact I even wrote an init script in Perl once - or you can write a simple init script whose start action simply runs the Perl script that sets the time. Since your task is just a one-off thing, you don't need all the complexities of a "real" init script, including Daemon::Control (for example you likely don't need the double-fork, PID file, etc.).
My understanding is that ntpd works best for systems that are continually on the network, talking to multiple time servers, while chrony was designed with systems with intermittent or no internet access at all in mind. Telling ntpd which Internet NTP servers to sync to is easy; but I was having lots of trouble getting ntpd to sync to gpsd and a "Pulse Per Second" (PPS) signal, with chrony it was much easier to configure and it basically worked right away.
Regards,
-- Hauke D
In reply to Re^3: Daemon::Control pid-files
by haukex
in thread Daemon::Control pid-files
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |