Fix munin error.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Wed, 1 Feb 2012 13:52:50 +0000 (14:52 +0100)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Wed, 1 Feb 2012 13:52:50 +0000 (14:52 +0100)
src/functions.sh

index 94db9b0..f690377 100644 (file)
@@ -952,8 +952,10 @@ upgrade_munin () {
   local config backup hostname domain
 
   # new htmldir location
-  mkdir -p /var/cache/munin
-  mv /var/www/munin /var/cache/munin/www
+  if [ -d /var/www/munin -a ! -e /var/cache/munin/www ]; then
+    mkdir -p /var/cache/munin
+    mv /var/www/munin /var/cache/munin/www
+  fi
 
   for pkg_name in munin munin-node; do
      pkg $pkg_name lt '1.4.5-3' || continue