[omd-commits] OMD Git: omd: apache: Fixed yesterdays change to apache hook handling
git version control
git at mathias-kettner.de
Tue Dec 16 11:36:19 CET 2014
Module: omd
Branch: master
Commit: 343a965667937b314c5ab6f9ff8ad147b9b26437
URL: http://omdistro.org/projects/omd/repository/revisions/343a965667937b314c5ab6f9ff8ad147b9b26437
Author: Lars Michelsen <lm at mathias-kettner.de>
Date: Tue Dec 16 11:36:15 2014 +0100
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date: Tue Dec 16 11:36:15 2014 +0100
apache: Fixed yesterdays change to apache hook handling
---
packages/apache-omd/APACHE_TCP_PORT.hook | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/packages/apache-omd/APACHE_TCP_PORT.hook b/packages/apache-omd/APACHE_TCP_PORT.hook
index d02e965..0043e5e 100755
--- a/packages/apache-omd/APACHE_TCP_PORT.hook
+++ b/packages/apache-omd/APACHE_TCP_PORT.hook
@@ -21,10 +21,13 @@ fi
port_is_used ()
{
local PORT=$1
- ls /omd/sites/* >/dev/null || return 1
- for conf in /omd/sites/*/etc/omd/site.conf
- do
- [ $conf != /omd/sites/$OMD_SITE/etc/omd/site.conf ] || continue
+ for S in $(ls /omd/sites); do
+ conf=/omd/sites/$S/etc/omd/site.conf
+ [ $S != $OMD_SITE ] || continue # skip current site
+ if ! ls $conf >/dev/null 2>&1; then
+ echo "ERROR: Failed to read config of site ${S}. APACHE_TCP_PORT will propably be allocated twice" >&2
+ continue
+ fi
if grep -qx "CONFIG_APACHE_TCP_PORT='$PORT'" < $conf > /dev/null 2>&1 ; then
return 0
fi
More information about the omd-commits
mailing list