X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgraph_config.c;h=6b9a97a7f2f9f5d90b5b09b51eea914a455fc6d2;hb=48e1cdc50ece8684c0ab87e8162d7fffe2edfbd0;hp=94dd440edc75d25a9242b6cfc4d0f511ecee2549;hpb=0ab3085f89e64eecd67d3179ea87f0463e918a10;p=collection4.git diff --git a/src/graph_config.c b/src/graph_config.c index 94dd440..6b9a97a 100644 --- a/src/graph_config.c +++ b/src/graph_config.c @@ -7,11 +7,14 @@ #include #include "graph_config.h" +#include "graph.h" #include "graph_list.h" #include "oconfig.h" #include "common.h" -#define CONFIG_FILE "/usr/lib/cgi-bin/octo/collection.conf" +#ifndef CONFIGFILE +# define CONFIGFILE "/etc/collection.conf" +#endif time_t last_read_mtime = 0; @@ -39,7 +42,7 @@ static int internal_read_config (void) /* {{{ */ { oconfig_item_t *ci; - ci = oconfig_parse_file (CONFIG_FILE); + ci = oconfig_parse_file (CONFIGFILE); if (ci == NULL) return (-1); @@ -58,7 +61,7 @@ static time_t get_config_mtime (void) /* {{{ */ int status; memset (&statbuf, 0, sizeof (statbuf)); - status = stat (CONFIG_FILE, &statbuf); + status = stat (CONFIGFILE, &statbuf); if (status != 0) return (0);