Module: nagvis
Branch: master
Commit: 89c5843cbbd40a9fc53d573f00b41c29a38f690c
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=89c5843cbbd40a9fc53d573f00b41c29a38f690c

Author: LaMi <[email protected]>
Date:   Sat Feb 20 19:13:58 2010 +0100

Adding MKLivestatus backend to the NagVis configuration when doing a fresh 
installation

---

 etc/automaps/__automap.cfg |    4 +---
 install.sh                 |   10 ++++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/etc/automaps/__automap.cfg b/etc/automaps/__automap.cfg
index 53459ec..ba387a2 100644
--- a/etc/automaps/__automap.cfg
+++ b/etc/automaps/__automap.cfg
@@ -1,7 +1,5 @@
 define global {
 alias=Default Automap
-allowed_user=EVERYONE
-allowed_for_config=EVERYONE
 iconset=std_small
 map_image=nagvis-demo.png
 hover_childs_sort=s
@@ -53,4 +51,4 @@ url=[htmlcgi]/status.cgi?host=[host_name]
 #y=0
 #iconset=std_big
 
#url=[htmlbase]/frontend/nagvis-js/index.php?mod=Automap&act=view&show=__automap&root=www2.nagvis.org&maxLayers=2&renderMode=undirected
-#}
\ No newline at end of file
+#}
diff --git a/install.sh b/install.sh
index 5349abd..7c675f3 100755
--- a/install.sh
+++ b/install.sh
@@ -907,6 +907,9 @@ line "Checking paths" "+"
 if [ $FORCE -eq 0 ]; then
        # Get Nagios/Icinga path
        while [ ! -d $NAGIOS_PATH ]; do
+               # Give this run a chance... Reset the return code
+               RC=0
+               
                if [ $INSTALLER_QUIET -ne 1 ]; then
                        echo -n "| Please enter the path to the $SOURCE base 
directory [$NAGIOS_PATH]: "
                        read APATH
@@ -1202,6 +1205,13 @@ if [ -f $NAGVIS_PATH/${NAGVIS_CONF}-sample ]; then
                DONE=`log "Creating main configuration file..." done` 
                cp -p $NAGVIS_PATH/${NAGVIS_CONF}-sample 
$NAGVIS_PATH/$NAGVIS_CONF
                chk_rc "|  Error copying sample configuration" "$DONE"
+
+               # Add livestatus backend when configured to use MKLivestatus
+               if [ ! -z $LIVESTATUS_SOCK ]; then
+                       DONE=`log "  Adding MKLivestatus Backend..." done`
+                       $SED -i 
's#;backend="ndomy_1"#backend="live_1"#g;s#;socket="unix:/usr/local/nagios/var/rw/live"#socket="'"$LIVESTATUS_SOCK"'"#g'
 $NAGVIS_PATH/$NAGVIS_CONF
+               chk_rc "|  Error adding MKLivstatus Backend" "$DONE"
+               fi
        fi
 fi
 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to