uci: add configs method to list all existing packages
[project/rpcd.git] / main.c
diff --git a/main.c b/main.c
index 52725cd..8a2356d 100644 (file)
--- a/main.c
+++ b/main.c
 
 #include <libubox/blobmsg_json.h>
 #include <libubus.h>
+#include <signal.h>
 
 #include "session.h"
 #include "file.h"
+#include "uci.h"
 
 static struct ubus_context *ctx;
 
@@ -42,6 +44,8 @@ int main(int argc, char **argv)
                }
        }
 
+       signal(SIGPIPE, SIG_IGN);
+
        argc -= optind;
        argv += optind;
 
@@ -57,6 +61,7 @@ int main(int argc, char **argv)
 
        rpc_session_api_init(ctx);
        rpc_file_api_init(ctx);
+       rpc_uci_api_init(ctx);
 
        uloop_run();
        ubus_free(ctx);