added error message if modules block is missing in configuration
[NeonServV5.git] / src / main.c
index fa8aee1f8bb24135776721aba6394c41705627b5..1287faf242dcba4c22148ccc945e55931ad570ea 100644 (file)
@@ -216,6 +216,12 @@ int main(int argc, char *argv[]) {
         exit(0);
     }
     check_firstrun();
+    char **modulelist = get_all_fieldnames("modules");
+    if(!modulelist || !modulelist[0]) {
+        fprintf(stderr, "no modules loaded... Please update your configuration!\n");
+        exit(0);
+    }
+    free(modulelist);
     if (run_as_daemon) {
         #ifndef WIN32
         /* Attempt to fork into the background if daemon mode is on. */