From 7b4281ec1965ba5f02b1094532636d89304bcdfa Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 19 Jun 2010 09:17:59 +0200 Subject: [PATCH] =?utf8?q?src/graph=5Fconfig.c:=20Use=20the=20correct=20co?= =?utf8?q?nfig=20file=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … rather than a hard-coded default. --- src/graph_config.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.30.2