Re: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory

2017-01-09 Thread Jo-Philipp Wich
Hi Baptiste, > I don't understand how this is possible, is start_service() called each > time a reload is requested? Yes. The init script always computes the service description and sends it to procd which then decides whether there are any changes in tracked resources and if so, it restarts the

Re: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory

2017-01-09 Thread Baptiste Jonglez
On Mon, Jan 09, 2017 at 04:58:23PM +0100, Baptiste Jonglez wrote: > On Mon, Jan 09, 2017 at 04:36:25PM +0100, Felix Fietkau wrote: > > It does not support passing a directory. You should do: > > procd_set_param file /tmp/babeld.d/*.conf (without quotes) > > I wanted to avoid this solution if

Re: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory

2017-01-09 Thread Baptiste Jonglez
On Mon, Jan 09, 2017 at 04:36:25PM +0100, Felix Fietkau wrote: > It does not support passing a directory. You should do: > procd_set_param file /tmp/babeld.d/*.conf (without quotes) I wanted to avoid this solution if possible, because it does not handle file creation. However, that is not a

Re: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory

2017-01-09 Thread Felix Fietkau
On 2017-01-09 16:29, Baptiste Jonglez wrote: > Hi, > > I am using the "procd_set_param file" feature of procd, so that calling > "/etc/init.d/myscript reload" only restarts the process if one of the > config file has changed. > > I was wondering if I can do the same thing on a directory?

Re: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory

2017-01-09 Thread Jo-Philipp Wich
Hi Baptiste, unfortunately it can't atm. Internally it calculates hashes over the contents of the given files and it has no handling for directory listing at all. You could consider creating a dummy configuration only containing a commented-out directory listing and register that with procd -

[LEDE-DEV] [procd] Using "procd_set_param file" on a directory

2017-01-09 Thread Baptiste Jonglez
Hi, I am using the "procd_set_param file" feature of procd, so that calling "/etc/init.d/myscript reload" only restarts the process if one of the config file has changed. I was wondering if I can do the same thing on a directory? Basically, my daemon can now take configuration from all files in