in reply to Re^3: Daemon::Control pid-files
in thread Daemon::Control pid-files

Yeah - Deamon::Control is overkill but as it generates the init-file it seems to be the fastest way (in terms of lazyness) to have a perl-subroutine run at boot-time.

And thanks for mentioning chrony - never heard of it before but will have a look at it.

Replies are listed 'Best First'.
Re^5: Daemon::Control pid-files
by haukex (Archbishop) on Apr 18, 2016 at 18:16 UTC

    Hi morgon,

    Looking back at what I wrote, it sounds like I'm very much against Daemon::Control, but my opinion is not that extreme - I've used the module myself and of course if it works, why not :-) And it sounds like you can just create the PID file in /tmp and ignore it afterwards.

    Just one more thought though: You mentioned in another reply that there are other init processes that depend on yours to set the time correctly. In that case, I'm not sure if forking into the background is good? Because I suspect init will only block until it's started the process, but not until it finishes, and if setting the time takes a few seconds, other processes may have been launched by init while the time hasn't been set yet. If that is indeed a problem then one solution might be to set Daemon::Control's fork option to zero.

    Regards,
    -- Hauke D