Disable openldap workarounds.
[carnet-upgrade.git] / src / functions.sh
index 4a37c25..a223c8a 100644 (file)
@@ -823,9 +823,19 @@ disable_monit () {
     apt-get remove --yes monit
     # stop the binary
     pkill -9 monit || true
+    # move away init for insserv to work
+    mv /etc/init.d/monit /var/lib/carnet-upgrade/
   fi
 }
 
+# allow monit to run again
+enable_monit () {
+  if [ -f /var/lib/carnet-upgrade/monit ]; then
+    mv /var/lib/carnet-upgrade/monit /etc/init.d/monit
+    pkgadd monit-cn
+  fi 
+}
+
 # check which of the given packages are installed
 grep_installed () {
   local package installed
@@ -890,19 +900,6 @@ upgrade_freeradius () {
   pkgadd freeradius-aai
 }
 
-# handle openldap upgrade
-upgrade_openldap () {
-  # aai discovers database type from debconf
-  if [ -f /etc/ldap/slapd.conf ] && grep -q ^database.*bdb /etc/ldap/slapd.conf
-  then
-     echo set slapd/backend BDB | debconf-communicate >/dev/null
-  fi
-
-  # aai does not depend on the new openldap version
-  pkgadd slapd
-  pkgadd openldap-aai
-}
-
 # handle mysql 5.0 to 5.1 upgrade
 upgrade_mysql () {
   if pkg mysql-server || pkg mysql-server-5.0; then
@@ -950,6 +947,10 @@ get_variable () {
 upgrade_munin () {
   local config backup hostname domain
 
+  # new htmldir location
+  mkdir -p /var/cache/munin
+  mv /var/www/munin /var/cache/munin/www
+
   for pkg_name in munin munin-node; do
      pkg $pkg_name lt '1.4.5-3' || continue