diff -Nur xymon-4.3.29.bak/lib/links.c xymon-4.3.29/lib/links.c --- xymon-4.3.29.bak/lib/links.c 2019-07-23 18:46:51.000000000 +0400 +++ xymon-4.3.29/lib/links.c 2019-09-11 11:26:35.282311240 +0400 @@ -78,7 +78,7 @@ return newlink; } -static void load_links(char *directory, char *urlprefix) +static void load_links(char *directory, char *urlprefix, int softfail) { DIR *linkdir; struct dirent *d; @@ -88,7 +88,8 @@ linkdir = opendir(directory); if (!linkdir) { - errprintf("Cannot read links in directory %s\n", directory); + if (softfail) { dbgprintf("Cannot read links in directory %s\n", directory); } + else errprintf("Cannot read links in directory %s\n", directory); return; } @@ -141,13 +142,16 @@ if (!hostdocurl || (strlen(hostdocurl) == 0)) { strncpy(dirname, xgetenv("XYMONNOTESDIR"), sizeof(dirname)); - load_links(dirname, notesskin); + load_links(dirname, notesskin, 1); } - /* Change xxx/xxx/xxx/notes into xxx/xxx/xxx/help */ - strncpy(dirname, xgetenv("XYMONNOTESDIR"), sizeof(dirname)); - p = strrchr(dirname, '/'); *p = '\0'; strncat(dirname, "/help", (sizeof(dirname) - strlen(dirname))); - load_links(dirname, helpskin); + /* If no XYMONHELPDIR, change xxx/xxx/xxx/notes into xxx/xxx/xxx/help */ + if (xgetenv("XYMONHELPDIR")) strncpy(dirname, xgetenv("XYMONHELPDIR"), sizeof(dirname)); + else { + strncpy(dirname, xgetenv("XYMONNOTESDIR"), sizeof(dirname)); + p = strrchr(dirname, '/'); *p = '\0'; strncat(dirname, "/help", (sizeof(dirname) - strlen(dirname))); + } + load_links(dirname, helpskin, 0); linksloaded = 1; diff -Nur xymon-4.3.29.bak/xymond/etcfiles/xymonserver.cfg.DIST xymon-4.3.29/xymond/etcfiles/xymonserver.cfg.DIST --- xymon-4.3.29.bak/xymond/etcfiles/xymonserver.cfg.DIST 2015-10-08 05:15:48.000000000 +0400 +++ xymon-4.3.29/xymond/etcfiles/xymonserver.cfg.DIST 2019-09-11 11:07:36.663615855 +0400 @@ -112,6 +112,7 @@ XYMONHTMLSTATUSDIR="$XYMONWWWDIR/html" # HTML status logs go here (xymond_filestore --status --html) XYMONNOTESDIR="$XYMONWWWDIR/notes" # For notes-files (xymond_filestore --notes) XYMONREPDIR="$XYMONWWWDIR/rep" # Top-level directory for Xymon reports. +XYMONHELPDIR="$XYMONSTATICWWWDIR/help" # Online help files are located here XYMONSNAPDIR="$XYMONWWWDIR/snap" # Top-level directory for Xymon snapshots. # For the xymond_history module