From: Florian Forster Date: Sat, 19 Jun 2010 07:17:59 +0000 (+0200) Subject: src/graph_config.c: Use the correct config file … X-Git-Tag: v4.0.0~233 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7b4281ec1965ba5f02b1094532636d89304bcdfa;p=collection4.git src/graph_config.c: Use the correct config file … … rather than a hard-coded default. --- diff --git a/src/graph_config.c b/src/graph_config.c index 94dd440..2a2b59d 100644 --- a/src/graph_config.c +++ b/src/graph_config.c @@ -11,7 +11,9 @@ #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 +41,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 +60,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);