[omd-commits] OMD Git: omd: shinken: bugfix in the mongodb-tcp-port-hook

git version control git at mathias-kettner.de
Sat May 19 21:10:31 CEST 2012


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

Author:   Gerhard Lausser <gerhard.lausser at consol.de>
Date:     Sat May 19 21:10:12 2012 +0200
Commiter: Gerhard Lausser <gerhard.lausser at consol.de>
Date:     Sat May 19 21:10:12 2012 +0200

shinken: bugfix in the mongodb-tcp-port-hook

---

 packages/shinken/MONGODB_TCP_PORT.hook |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/packages/shinken/MONGODB_TCP_PORT.hook b/packages/shinken/MONGODB_TCP_PORT.hook
index e4fbbfa..be1c4f8 100755
--- a/packages/shinken/MONGODB_TCP_PORT.hook
+++ b/packages/shinken/MONGODB_TCP_PORT.hook
@@ -54,19 +54,19 @@ case "$1" in
             BIND_IP=127.0.0.1
         else
             BIND_IP=${SELECTED_PORT%%:*}
-            SELECTED_PORT=999
+            SELECTED_PORT=${SELECTED_PORT##*:}
         fi
         PORT=$(next_free_hook $SELECTED_PORT)
         if [ "$PORT" != "$SELECTED_PORT" ] ; then
             echo "MongoDB port $SELECTED_PORT is in use. I've choosen $PORT instead." >&2
             echo "$PORT"
         fi
-        cat <<EOF > $OMD_ROOT/etc/mongodb/port.conf
+        cat <<EOF > $OMD_ROOT/etc/mongodb/mongod.d/port.conf
 port = $PORT
 bind_ip = $BIND_IP
 EOF
     ;;
     depends)
-        [ "$MONGODB" = on ]
+        [ "$CONFIG_MONGODB" = on ]
     ;;
 esac



More information about the omd-commits mailing list