[omd-commits] OMD Git: omd: FIX: Fixed possible "omd create" issue when APACHE_TCP_ADDR hook is executed after APACHE_TCP_PORT hook

git version control git at mathias-kettner.de
Thu May 19 17:29:32 CEST 2016


Module:   omd
Branch:   master
Commit:   b4a9d5565fd214e4c712c5589647b5dde2a474f4
URL:      http://omdistro.org/projects/omd/repository/revisions/b4a9d5565fd214e4c712c5589647b5dde2a474f4

Author:   Lars Michelsen <lm at larsmichelsen.com>
Date:     Thu May 19 17:29:25 2016 +0200
Commiter: Lars Michelsen <lm at larsmichelsen.com>
Date:     Thu May 19 17:29:25 2016 +0200

FIX: Fixed possible "omd create" issue when APACHE_TCP_ADDR hook is executed after APACHE_TCP_PORT hook

---

 Changelog                                |    2 ++
 packages/apache-omd/APACHE_TCP_ADDR.hook |    6 +++---
 packages/apache-omd/APACHE_TCP_PORT.hook |    2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index 8afb61f..5ea8f46 100644
--- a/Changelog
+++ b/Changelog
@@ -8,6 +8,8 @@ This file documents the revision history for the Open Monitoring Distribution
             - FIX: Added missing but documented --conflict flag to "omd restore"
             - FIX: Skipping partially created sites during omd start/stop/restart
             - FIX: Set correct shell environment for cronjobs
+            - FIX: Fixed possible "omd create" issue when APACHE_TCP_ADDR hook
+                   was executed after APACHE_TCP_PORT
             - omd backup: Can use --no-rrds,--no-logs or --no-past now to
               exclude RRDs and/or the monitoring history from the backup. These
               options can be used to make the backup/restore procedure faster
diff --git a/packages/apache-omd/APACHE_TCP_ADDR.hook b/packages/apache-omd/APACHE_TCP_ADDR.hook
index ba093ce..2a59b1a 100755
--- a/packages/apache-omd/APACHE_TCP_ADDR.hook
+++ b/packages/apache-omd/APACHE_TCP_ADDR.hook
@@ -19,16 +19,16 @@
 if [ -f $OMD_ROOT/etc/omd/site.conf ]; then
     . $OMD_ROOT/etc/omd/site.conf
 else
-    CONFIG_APACHE_TCP_PORT=0
+    CONFIG_APACHE_TCP_PORT=${CONFIG_APACHE_TCP_PORT:-0}
 fi
 
 case "$1" in
     default)
         echo "127.0.0.1"
     ;;
-		choices)
+    choices)
         echo "([a-z0-9-]+|(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3}))"
-		;;
+    ;;
     set)
         APACHE_HOST=$2
         cat <<EOF > $OMD_ROOT/etc/apache/listen-port.conf
diff --git a/packages/apache-omd/APACHE_TCP_PORT.hook b/packages/apache-omd/APACHE_TCP_PORT.hook
index dbaf5a3..0b02420 100755
--- a/packages/apache-omd/APACHE_TCP_PORT.hook
+++ b/packages/apache-omd/APACHE_TCP_PORT.hook
@@ -15,7 +15,7 @@
 if [ -f $OMD_ROOT/etc/omd/site.conf ]; then
     . $OMD_ROOT/etc/omd/site.conf
 else
-    CONFIG_APACHE_TCP_ADDR=127.0.0.1
+    CONFIG_APACHE_TCP_ADDR=${CONFIG_APACHE_TCP_ADDR:-127.0.0.1}
 fi
 
 case "$1" in



More information about the omd-commits mailing list