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

Hi,

many thanks for your reply - it is very interesting.

However my requirement is a little different (I probably should have mentioned that earlier).

My Pi runs with an older (still system v init) based version of raspbian.

What I want is to set the time at boot time from a dvb-c signal (a one-off event) - but I want to do that not at some random time but at a time after syslog is available but before certain other services start start.

By using a sysv init script I can express this order via LSB-entries which makes it pretty simple.

This has led me to Daemon::Control which in turn requires the use of a pid file (that I don't really care about).

And while this may be a topic for another forum: Do you think daemontools still have an ecological niche on Debian-based systems now that systemd is taking over?

Replies are listed 'Best First'.
Re^5: Daemon::Control pid-files
by afoken (Chancellor) on Apr 18, 2016 at 14:43 UTC

    What I want is to set the time at boot time from a dvb-c signal (a one-off event) - but I want to do that not at some random time but at a time after syslog is available but before certain other services start start.

    By using a sysv init script I can express this order via LSB-entries which makes it pretty simple.

    In that case, you don't need a daemon at all. LSB-ordering makes sure that your init script runs at the right time. In the init script, you simply run a program to read the time signal, blocking. No need for a daemon.

    Do you think daemontools still have an ecological niche on Debian-based systems now that systemd is taking over?

    Systemd is IMHO an ugly monster, stuffing everything and the kitchen sink into one fat binary (or two) on which the entire system depends. Just the opposite of what made Unix great: Little programs that can be combined like LEGO to build things that nobody did think of when they were written. Daemontools follow the Unix spirit of little programs that do one thing, and do that right.

    Using daemontools does not mean that you have to remove SysV init, BSD init or Systemd. You could do so, and use a very tiny init that just starts a script to make sure the system is ready to start deamontools, and then passes control to daemontools. But svscanboot can be started like any other service from some init script, or directly from init. This is also the way I use daemontools: I added sv:2345:respawn:/command/svscanboot to /etc/inittab.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)