[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

David GUENAULT dguenault at monitoring-fr.org
Tue Feb 28 22:21:41 UTC 2012


The following commit has been merged in the debian/master branch:
commit ce43029fb85244faede7f203936659d0e8cb531e
Author: David GUENAULT <dguenault at monitoring-fr.org>
Date:   Sun Feb 19 08:03:30 2012 +0100

    Add constraint for plugins and addons installation : shinken should be installed first
    When removing multisite also remove sudoers configuration

diff --git a/contrib/alternative-installation/shinken-install/shinken.sh b/contrib/alternative-installation/shinken-install/shinken.sh
index be3b0f7..0a0f96b 100755
--- a/contrib/alternative-installation/shinken-install/shinken.sh
+++ b/contrib/alternative-installation/shinken-install/shinken.sh
@@ -119,6 +119,9 @@ function remove(){
             then
                 rm -Rf $PNPPREFIX.MK
             fi
+            cecho " > Remove sudoers configuration" green
+            sed -i "/^# Needed for  WATO/,+2d" /etc/sudoers
+            cecho " > Remove apache configuration" green
             case $CODE in
                     REDHAT)
                             rm -f /etc/httpd/conf.d/zzz_check_mk.conf >> /tmp/shinken.install.log 2>&1
@@ -249,6 +252,17 @@ function check_exist(){
 
 }
 
+function shinken_exist(){
+    if [ -d $TARGET ]
+    then
+        echo 1
+        return 1
+    else
+        echo 0
+        return 0
+    fi
+}
+
 function installpkg(){
     type=$1
     package=$2
@@ -1814,6 +1828,13 @@ fi
 while getopts "kidubcr:lz:hsvp:we:" opt; do
     case $opt in
         p)
+
+            if [ $(shinken_exist) -eq 0 ]
+            then
+                cecho " > You should install shinken first ! " red
+                exit 2
+            fi
+
             if [ "$OPTARG" == "check_esx3" ]
             then
                 install_check_esx3

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list