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 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.