Author:   Lars Michelsen <[email protected]>
Date:     Thu Nov 24 11:29:41 2011 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Nov 24 11:29:41 2011 +0100

omd_install.sh deals now correctly with new conf.d directory

---

 ChangeLog      |    1 +
 TODO           |    2 --
 omd_install.sh |   13 ++++++++-----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e87361..565a824 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 1.6
 Core
   * Implented conf.d/ directory to have an optional modular main configuration
+  * omd_install.sh deals now correctly with new conf.d directory
   * Improved the installer a bit: Better directory detections; Less questions
     during update
   * Removed all old demo maps and created new ones using an the internal test
diff --git a/TODO b/TODO
index c788e41..e929be5 100644
--- a/TODO
+++ b/TODO
@@ -13,8 +13,6 @@ Relative Koordinaten:
 - Abgebrochene Linie wieder aus Ansicht entfernen
 - line_weather_color umbrechen wenn als Text dargestellt
 - line_label_y_offset wird noch nicht sauber berechnet
-- omd_install.sh - muss mit alten nagvis-omd.ini.php umgehen können und die 
-  nach conf.d/omd.ini.php bewegen können
 
 -------------------------------------------------------------------------------
 
diff --git a/omd_install.sh b/omd_install.sh
index 6664cbc..c4ad2ac 100755
--- a/omd_install.sh
+++ b/omd_install.sh
@@ -69,13 +69,16 @@ if [ -d $OMD_ROOT/var/nagvis/userfiles ]; then
 fi
 
 # Handle the old and new omd specific config file paths
-if [ -d $OMD_ROOT/etc/nagvis/conf.d ]; then
-    OMD_CFG=$OMD_ROOT/etc/nagvis/conf.d/omd.ini.php
-else
-    OMD_CFG=$OMD_ROOT/etc/nagvis/nagvis-omd.ini.php
+OMD_CFG=$OMD_ROOT/etc/nagvis/conf.d/omd.ini.php
+if [ ! -d $OMD_ROOT/etc/nagvis/conf.d ]; then
+    mkdir $OMD_ROOT/etc/nagvis/conf.d
+    if [ -f $OMD_ROOT/etc/nagvis/nagvis-omd.ini.php ]; then
+        mv $OMD_ROOT/etc/nagvis/nagvis-omd.ini.php 
$OMD_ROOT/etc/nagvis/conf.d/omd.ini.php
+        ln -s $OMD_ROOT/etc/nagvis/conf.d/omd.ini.php 
$OMD_ROOT/etc/nagvis/nagvis-omd.ini.php
+    fi
 fi
 
-# Backup the nagvis-omd.ini.php on first time using omd_install.sh
+# Backup the omd.ini.php on first time using omd_install.sh
 if ! grep omd_install.sh $OMD_CFG >/dev/null 2>&1; then
     cp $OMD_CFG $OMD_CFG.bak
 fi


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to