make ubusd load the acl on start and HUP
Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
parent
e3815962c1
commit
3bfa6ab128
1 changed files with 7 additions and 0 deletions
7
ubusd.c
7
ubusd.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue