Is there a way to use one procd init script to run multiple service instances (processes), similar to the "instantiated services" which systemd offers?
I am trying to run one and the same program with different arguments in parallel. The number of instantiations should be defined by a set of UCI sections; each section provides the individual instance's arguments.
I think you should use different instance names. Have a look at dnsmasq which supports multiple instances.
I already created a script using a variable for the instance name, but had some issues. I wasn't sure if procd is supposed to be used that way. Thanks for the hint with dnsmasq, this will probably help.
I'm sure there're other init scripts doing that, but one of the simpler examples would be the https_dns_proxy init script. It iterates over uci sections calling with PROCD definition for each of them.
Maybe pservice is worth a try
Thanks for all the helpful answers, I will now get back to it. With the examples provided I will definitely be able to solve my problem.