ports/sysutils/nut/patches/patch-clients_upsstats_c

22 lines
577 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: clients/upsstats.c
--- clients/upsstats.c.orig
+++ clients/upsstats.c
@@ -848,7 +848,7 @@ static void display_template(const char *tfn)
{
char fn[SMALLBUF], buf[LARGEBUF];
- snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn);
+ snprintf(fn, sizeof(fn), "%s/%s", cgiconfpath(), tfn);
tf = fopen(fn, "r");
@@ -968,7 +968,7 @@ static void load_hosts_conf(void)
char fn[SMALLBUF];
PCONF_CTX_t ctx;
- snprintf(fn, sizeof(fn), "%s/hosts.conf", CONFPATH);
+ snprintf(fn, sizeof(fn), "%s/hosts.conf", cgiconfpath());
pconf_init(&ctx, upsstats_hosts_err);