I wrote an LSB init script that can manage multiple instances of my daemon:
rcfoo start starts all the instances (which are found in some
/etc configuration file),
rcfoo stop stops all the instances,
rcfoo status displays the status of all instances, and
rcfoo reload reloads updates the daemon with a changed configuration.
First I wonder how to detect the instances to work on with some
foo@.service systemd unit file. AFAIK I must specify all the instances like
foo@B, and so on.
Second my LSB script can report an extended status, meaning it can display whether a service
reload is needed (and my
reload actually optimizes to only reload the services that need it). How can I make a custom status report? I think a script has to use
systemd-notify for custom status messages.
Fortunately my final extension to the LSB script, namely manipulating single instances by adding
single <instance> (like in
rcfoo start single A), is supported out-of-the-box with systemd.
So my basic question is the first one.