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

Author: Lars Michelsen <[email protected]>
Date:   Fri Apr 23 19:02:53 2010 +0200

Added /var/run/nagios/rw/live to the autodetected livestatus paths

---

 install.sh |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/install.sh b/install.sh
index 13a59b8..b9cddea 100755
--- a/install.sh
+++ b/install.sh
@@ -377,6 +377,15 @@ detect_nagios_path() {
        done
        IFS=" "
 }
+
+# Tries to detect the correct path to the livestatus socket locally
+detect_livestatus_socket() {
+       if [ -S "/var/run/nagios/rw/live" ]; then
+               LIVESTATUS_SOCK="unix:/var/run/nagios/rw/live"
+       else
+               LIVESTATUS_SOCK="unix:$NAGIOS_PATH/var/rw/live"
+       fi
+}
  
 # Check Backend module prerequisites
 check_backend() {
@@ -404,7 +413,7 @@ check_backend() {
 
        echo $NAGVIS_BACKEND | grep -i "MKLIVESTATUS" >/dev/null
        if [ $? -eq 0 ]; then
-               [ -z "$LIVESTATUS_SOCK" ] && 
LIVESTATUS_SOCK="unix:$NAGIOS_PATH/var/rw/live"
+               [ -z "$LIVESTATUS_SOCK" ] && detect_livestatus_socket
                
                # Check if the livestatus socket is available
                # when not using a tcp socket


------------------------------------------------------------------------------
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to