+
+ DEBUG ("lua plugin: base_path = \"%s\";", base_path);
+
+ return (0);
+} /* }}} int lua_config_base_path */
+
+static int lua_config_script (const oconfig_item_t *ci) /* {{{ */
+{
+ char rel_path[PATH_MAX + 1];
+ char abs_path[PATH_MAX + 1];
+ int status;
+
+ status = cf_util_get_string_buffer (ci, rel_path, sizeof (rel_path));
+ if (status != 0)
+ return (status);
+
+ if (base_path[0] == 0)
+ sstrncpy (abs_path, rel_path, sizeof (abs_path));
+ else
+ ssnprintf (abs_path, sizeof (abs_path), "%s/%s", base_path, rel_path);
+
+ DEBUG ("lua plugin: abs_path = \"%s\";", abs_path);
+
+ status = lua_script_load (abs_path);
+ if (status != 0)
+ return (status);
+
+ INFO("lua plugin: File \"%s\" loaded succesfully", abs_path);