afs-supervisor: Add systemd service and config
[src/app-framework-binder.git] / src / main.c
index ff35b54..c735ecb 100644 (file)
@@ -51,7 +51,6 @@
 #include "afb-common.h"
 #include "afb-monitor.h"
 #include "afb-hook.h"
-#include "sd-fds.h"
 #include "afb-debug.h"
 #include "process-name.h"
 #include "afb-supervision.h"
@@ -586,6 +585,8 @@ static void start(int signum, void *arg)
                afb_hook_create_svc(NULL, main_config->tracesvc, NULL, NULL);
        if (main_config->traceevt)
                afb_hook_create_evt(NULL, main_config->traceevt, NULL, NULL);
+       if (main_config->traceses)
+               afb_hook_create_session(NULL, main_config->traceses, NULL, NULL);
 
        /* load bindings */
        afb_debug("start-load");
@@ -654,8 +655,6 @@ int main(int argc, char *argv[])
        // let's run this program with a low priority
        nice(20);
 
-       sd_fds_init();
-
        // ------------- Build session handler & init config -------
        main_config = afb_config_parse_arguments(argc, argv);
        if (main_config->name) {