[Xymon] "include: command not found" in apache logs
Jeremy Laidman
jlaidman at rebel-it.com.au
Thu Jul 26 06:20:59 CEST 2012
There are a couple of shell scripts under cgi-bin that do this:
. /path/to/xymonserver.cfg
Unfortunately, I have an "include" in that file. So whenever I either do a
report (report.sh) or look at a snapshot view (snapshot.sh) I get this kind
of thing in the Apache log:
[Wed Jul 25 09:45:18 2012] [error] [client 192.168.1.11]
/usr/lib/xymon/server/etc/xymonserver.cfg: line 4: include: command not
found, referer: https://servername/xymon-cgi/report.sh
My include specifies a file called xymonserver-local.cfg, in which I define
server-specific configurations such as XYMONSERVERHOSTNAME and
XYMONSERVERIP. So these won't be seen by these two CGI scripts. I doubt
that any of the definitions in my include file are important. However, if
I had ALL of my definintions in an include file, and xymonserver.cfg
consisted only of "include otherfile.cfg", I wonder what would break.
It's obvious that the way the definitions are added into the CGI script's
environment is not appropriate for the type of file - "Even though it might
look like a shell-script, it is NOT." Furthermore, this extra line appears
to be redundant, given that $CGI_SNAPSHOT_OPTS and $CGI_REP_OPTS both
include "--env $XYMONENV", and $XYMONENV is set to
/path/to/xymonserver.cfg. So I suspect that this line can be taken out
altogether.
Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120726/631a901d/attachment.html>
More information about the Xymon
mailing list