Rename from "luci-rpcd" to "rpcd"
[project/rpcd.git] / main.c
diff --git a/main.c b/main.c
index 52725cd..efaa114 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
 /*
- * luci-rpcd - LuCI UBUS RPC server
+ * rpcd - UBUS RPC server
  *
  *   Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org>
  *   Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
 
 #include <libubox/blobmsg_json.h>
 #include <libubus.h>
+#include <signal.h>
 
 #include "session.h"
-#include "file.h"
+#include "uci.h"
+#include "plugin.h"
 
 static struct ubus_context *ctx;
 
@@ -42,6 +44,8 @@ int main(int argc, char **argv)
                }
        }
 
+       signal(SIGPIPE, SIG_IGN);
+
        argc -= optind;
        argv += optind;
 
@@ -56,7 +60,8 @@ int main(int argc, char **argv)
        ubus_add_uloop(ctx);
 
        rpc_session_api_init(ctx);
-       rpc_file_api_init(ctx);
+       rpc_uci_api_init(ctx);
+       rpc_plugin_api_init(ctx);
 
        uloop_run();
        ubus_free(ctx);