Fix paths to fit into the Debian directory structure

Index: xymon/xymond/etcfiles/xymonserver.cfg.DIST
===================================================================
--- xymon.orig/xymond/etcfiles/xymonserver.cfg.DIST	2011-09-29 23:49:01.000000000 +0200
+++ xymon/xymond/etcfiles/xymonserver.cfg.DIST	2011-09-30 00:26:01.000000000 +0200
@@ -5,8 +5,8 @@
 XYMONCLIENTHOME="@XYMONTOPDIR@/client"		# XYMONHOME directory for the client
 
 
-XYMONSERVERHOSTNAME="@XYMONHOSTNAME@"		# The hostname of your server
-XYMONSERVERIP="@XYMONHOSTIP@"			# The IP-address of your server. Use the real one, not 127.0.0.1 .
+include /etc/default/xymon-client
+XYMONSERVERHOSTNAME="$CLIENTHOSTNAME"
 XYMONSERVEROS="@XYMONHOSTOS@"			# The operating system of your server. linux,freebsd,solaris,hpux,aix,osf
 
 XYMONSERVERWWWNAME="@XYMONHOSTNAME@"		# The name used for this hosts' webserver
@@ -35,8 +35,7 @@
 
 # General settings
 XYMONDPORT="1984"		# Portnumber where xymond listens
-XYMSRV="$XYMONSERVERIP"		# IP of a single Xymon server
-XYMSERVERS=""			# IP of multiple Xymon servers. If used, XYMSRV must be 0.0.0.0
+include /var/run/xymon/bbdisp-runtime.cfg
 FQDN="TRUE"			# Use fully-qualified hostnames internally. Keep it TRUE unless you know better.
 XYMONLOGSTATUS="DYNAMIC"	# Are HTML status logs statically or dynamically generated?
 				# Use DYNAMIC with Xymon, unless you run xymond_filestore --status --html
@@ -61,9 +60,9 @@
 XYMONWEBHOSTURL="$XYMONWEBHOST$XYMONSERVERWWWURL"	# Prefix for all static Xymon pages - http://www.foo.com/xymon
 XYMONWEBHTMLLOGS="$XYMONWEBHOSTURL/html"	# Prefix for the Xymon HTML logs (only if XYMONLOGSTATUS=STATIC)
 XYMONWEB="$XYMONSERVERWWWURL"			# Xymon URL prefix without the host part
-XYMONSKIN="$XYMONSERVERWWWURL/gifs"		# Xymon URL prefix for the GIF files
+XYMONSKIN="$XYMONSERVERWWWURL/gifs/static"	# Xymon URL prefix for the GIF files
 XYMONHELPSKIN="$XYMONSERVERWWWURL/help"         # Xymon URL prefix for the online help files.
 XYMONNOTESSKIN="$XYMONSERVERWWWURL/notes"       # Xymon URL prefix for the online notes-files.
 XYMONMENUSKIN="$XYMONSERVERWWWURL/menu"         # Xymon URL prefix for the webpage menu files.
 XYMONREPURL="$XYMONSERVERWWWURL/rep"		# Xymon URL prefix for the Xymon availability reports
 XYMONSNAPURL="$XYMONSERVERWWWURL/snap"		# Xymon URL prefix for the Xymon snapshots
@@ -73,7 +73,7 @@
 
 # Locations of system-wide files and directories
 XYMONHOME="@XYMONHOME@"				# The Xymon server directory, where programs and configurations go. 
-XYMONTMP="$XYMONHOME/tmp"			# Directory used for temporary files.
+XYMONTMP="/var/lib/xymon/tmp"			# Directory used for temporary files.
 HOSTSCFG="$XYMONHOME/etc/hosts.cfg"		# The hosts.cfg file
 XYMON="$XYMONHOME/bin/xymon"			# The 'xymon' client program
 XYMONGEN="$XYMONHOME/bin/xymongen"		# The xymongen program
@@ -287,3 +287,5 @@
 HOBBITCLIENTHOME="$XYMONCLIENTHOME"
 BBCLIENTLOGS="$XYMONSERVERLOGS"
 
+include /var/run/xymon/xymonclient-include.cfg
+include /var/run/xymon/xymonserver-include.cfg
Index: xymon/xymond/etcfiles/xymon-apache-open.DIST
===================================================================
--- xymon.orig/xymond/etcfiles/xymon-apache-open.DIST	2011-09-29 20:22:32.000000000 +0200
+++ xymon/xymond/etcfiles/xymon-apache-open.DIST	2011-09-30 00:26:01.000000000 +0200
@@ -15,7 +15,7 @@
 <Directory "@INSTALLWWWDIR@">
     Options Indexes FollowSymLinks Includes MultiViews
     Order allow,deny
-    Allow from all
+    Allow from localhost ::1/128
 </Directory>
 
 ScriptAlias @XYMONCGIURL@/ "@CGIDIR@/"
@@ -23,7 +23,7 @@
     AllowOverride None
     Options ExecCGI Includes
     Order allow,deny
-    Allow from all
+    Allow from localhost ::1/128
 </Directory>
 
 
Index: xymon/xymond/etcfiles/xymon-apache-secure.DIST
===================================================================
--- xymon.orig/xymond/etcfiles/xymon-apache-secure.DIST	2011-09-29 20:22:32.000000000 +0200
+++ xymon/xymond/etcfiles/xymon-apache-secure.DIST	2011-09-30 00:26:01.000000000 +0200
@@ -15,7 +15,7 @@
 <Directory "@INSTALLWWWDIR@">
     Options Indexes FollowSymLinks Includes MultiViews
     Order allow,deny
-    Allow from all
+    Allow from localhost ::1/128
 </Directory>
 
 ScriptAlias @XYMONCGIURL@/ "@CGIDIR@/"
@@ -23,7 +23,7 @@
     AllowOverride None
     Options ExecCGI Includes
     Order allow,deny
-    Allow from all
+    Allow from localhost ::1/128
 </Directory>
 
 ScriptAlias @SECUREXYMONCGIURL@/ "@SECURECGIDIR@/"
@@ -31,7 +31,7 @@
     AllowOverride None
     Options ExecCGI Includes
     Order allow,deny
-    Allow from all
+    Allow from localhost ::1/128
 
     # Password file where users with access to these scripts are kept.
     # Create it with "htpasswd -c @INSTALLETCDIR@/xymonpasswd USERNAME"
Index: xymon/xymond/etcfiles/tasks.cfg.DIST
===================================================================
--- xymon.orig/xymond/etcfiles/tasks.cfg.DIST	2011-09-29 20:22:32.000000000 +0200
+++ xymon/xymond/etcfiles/tasks.cfg.DIST	2011-09-30 00:26:01.000000000 +0200
@@ -18,7 +18,7 @@
 # you want to run).
 [xymond]
 	ENVFILE @XYMONHOME@/etc/xymonserver.cfg
-	CMD xymond --pidfile=$XYMONSERVERLOGS/xymond.pid \
+	CMD xymond --pidfile=/var/run/xymon/xymond.pid \
 		--restart=$XYMONTMP/xymond.chk --checkpoint-file=$XYMONTMP/xymond.chk --checkpoint-interval=600 \
 		--log=$XYMONSERVERLOGS/xymond.log \
 		--admin-senders=127.0.0.1,$XYMONSERVERIP \
@@ -87,7 +87,7 @@
 [xymonproxy]
 	DISABLED
 	ENVFILE @XYMONHOME@/etc/xymonserver.cfg
-	CMD $XYMONHOME/bin/xymonproxy --server=YOUR.XYMON.SERVER.IP --report=$MACHINE.xymonproxy --no-daemon --pidfile=$XYMONSERVERLOGS/xymonproxy.pid
+	CMD $XYMONHOME/bin/xymonproxy --server=YOUR.XYMON.SERVER.IP --report=$MACHINE.xymonproxy --no-daemon --pidfile=/var/run/xymon/xymonproxy.pid
 	LOGFILE $XYMONSERVERLOGS/xymonproxy.log
 
 
@@ -102,7 +102,7 @@
 [xymonfetch]
 	DISABLED
 	ENVFILE @XYMONHOME@/etc/xymonserver.cfg
-	CMD $XYMONHOME/bin/xymonfetch --server=YOUR.XYMON.SERVER.IP --no-daemon --pidfile=$XYMONSERVERLOGS/xymonfetch.pid
+	CMD $XYMONHOME/bin/xymonfetch --server=YOUR.XYMON.SERVER.IP --no-daemon --pidfile=/var/run/xymon/xymonfetch.pid
 	LOGFILE $XYMONSERVERLOGS/xymonfetch.log
 
 
@@ -238,3 +238,5 @@
 # Include add-on modules.
 directory @XYMONHOME@/etc/tasks.d
 
+include /var/run/xymon/clientlaunch-include.cfg
+include /var/run/xymon/xymonlaunch-include.cfg
Index: xymon/client/clientlaunch.cfg.DIST
===================================================================
--- xymon.orig/client/clientlaunch.cfg.DIST	2011-09-29 20:22:32.000000000 +0200
+++ xymon/client/clientlaunch.cfg.DIST	2011-09-30 00:26:01.000000000 +0200
@@ -16,7 +16,7 @@
 [msgcache]
 	DISABLED
 	ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
-	CMD $XYMONCLIENTHOME/bin/msgcache --no-daemon --pidfile=$XYMONCLIENTLOGS/msgcache.pid
+	CMD $XYMONCLIENTHOME/bin/msgcache --no-daemon --pidfile=/var/run/xymon/msgcache.pid
 	LOGFILE $XYMONCLIENTLOGS/msgcache.log
 
 # The main client task
Index: xymon/client/xymonclient.cfg.DIST
===================================================================
--- xymon.orig/client/xymonclient.cfg.DIST	2011-09-29 20:22:32.000000000 +0200
+++ xymon/client/xymonclient.cfg.DIST	2011-09-30 00:26:01.000000000 +0200
@@ -1,17 +1,20 @@
 # Environment settings for the Xymon client.
 
-XYMSRV="@XYMONHOSTIP@"          # IP address of the Xymon server
-XYMSERVERS=""                   # IP of multiple Xymon servers. XYMSRV must be "0.0.0.0".
+include /etc/default/xymon-client
+include /var/run/xymon/bbdisp-runtime.cfg
 CONFIGCLASS="$SERVEROSTYPE"     # Default configuration class for logfiles
 
-PATH="/bin:/usr/bin:/sbin:/usr/sbin:/etc"  # PATH setting for the client scripts.
+PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/lib/xymon/client/bin"  # PATH setting for the client scripts.
 
 # You normally dont need to modify anything below here
 XYMONDPORT="1984"                   # Portnumber where xymond listens
+XYMONCLIENTHOME="/usr/lib/xymon/client"
 XYMONHOME="$XYMONCLIENTHOME"       # Directory for the Xymon client files
 XYMON="$XYMONHOME/bin/xymon"          # The Xymon client "xymon" utility
-XYMONTMP="$XYMONHOME/tmp"             # Where we may store temporary files.
-XYMONCLIENTLOGS="$XYMONHOME/logs"     # Where we store the client logfiles
+XYMONTMP="/var/lib/xymon/tmp"     # Where we may store temporary files.
+XYMONCLIENTLOGS="/var/log/xymon"  # Where we store the client logfiles
+
+include /var/run/xymon/xymonclient-include.cfg
 
 # Compatibility settings
 HOBBITCLIENTHOME="$XYMONCLIENTHOME"
Index: xymon/xymond/etcfiles/graphs.cfg
===================================================================
--- xymon.orig/xymond/etcfiles/graphs.cfg	2011-09-29 20:22:33.000000000 +0200
+++ xymon/xymond/etcfiles/graphs.cfg	2011-09-30 00:26:01.000000000 +0200
@@ -2095,3 +2095,4 @@
 
 ########### end of ifmib graphs ###########
 
+include /var/run/xymon/xymongraph-include.cfg
