[LEDE-DEV] procd & custom reload support
zajec5 at gmail.com
Thu Jan 12 15:19:29 PST 2017
I've app that reads config from /etc/foo.conf and I use init.d script
to generate that file based on /etc/config/foo.
A nice feature my app has is runtime config reload triggered by
kill -SIGUSR1 $PID
I guess I need something like this:
config_get port basic port
echo $port > /etc/foo.conf
procd_set_param command /sbin/foo
procd_set_param file /etc/foo.conf
Now, reloading... I know I could do:
local pid="$(pgrep /sbin/foo)"
kill -SIGUSR1 $pid
But this would be called on every
What I'd like to achieve is procd monitoring /etc/foo.conf and calling
my custom reload function if there is a real need to reload service.
Is that possible with procd?
More information about the Lede-dev