diff options
author | John Crispin <blogic@openwrt.org> | 2015-04-16 01:54:15 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-06-18 19:01:17 +0200 |
commit | 3bfa6ab128ee0ab9bd4bc0b2dbaa751902e7f340 (patch) | |
tree | c4f72ae2a931bc9d75c6dd35e517c2ed85d941c5 /ubusd.c | |
parent | e3815962c184b92f5e592ec6b7298898a113371f (diff) | |
download | ubus-3bfa6ab128ee0ab9bd4bc0b2dbaa751902e7f340.tar.gz |
make ubusd load the acl on start and HUP
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'ubusd.c')
-rw-r--r-- | ubusd.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -356,6 +356,11 @@ static int usage(const char *progname) return 1; } +static void sighup_handler(int sig) +{ + ubusd_acl_load(); +} + int main(int argc, char **argv) { const char *ubus_socket = UBUS_UNIX_SOCKET; @@ -363,6 +368,7 @@ int main(int argc, char **argv) int ch; signal(SIGPIPE, SIG_IGN); + signal(SIGHUP, sighup_handler); openlog("ubusd", LOG_PID, LOG_DAEMON); uloop_init(); @@ -386,6 +392,7 @@ int main(int argc, char **argv) goto out; } uloop_fd_add(&server_fd, ULOOP_READ | ULOOP_EDGE_TRIGGER); + ubusd_acl_load(); uloop_run(); unlink(ubus_socket); |