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

Baptiste Jonglez baptiste at bitsofnetworks.org
Mon Jan 9 07:29:57 PST 2017


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 a given directory,
"/tmp/babeld.d/*.conf".  So, I would like to pass "/tmp/babeld.d" like this:

    procd_set_param file "/tmp/babeld.d/"

In this case, will procd look for changes in any files in this directory?
Will it also detect file creation/deletion?

Thanks,
Baptiste

PS: the complete procd block is the following:

        procd_open_instance      
        procd_set_param command /usr/sbin/babeld -I "" -c "/etc/babeld.conf" -c "/var/etc/babeld.conf"
        procd_set_param stdout 1
        procd_set_param stderr 1                               
        # Last argument is a directory
        procd_set_param file "/var/etc/babeld.conf" "/etc/babeld.conf" "/tmp/babeld.d"
        procd_set_param respawn                           
        procd_close_instance
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/40bc6d4f/attachment.sig>


More information about the Lede-dev mailing list