]> gitweb.fluxo.info Git - hydra.git/commitdiff
Jessie customizations and script reordering
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 20 Mar 2016 17:57:28 +0000 (14:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 20 Mar 2016 17:57:28 +0000 (14:57 -0300)
share/hydractl/system-upgrade

index b9a6b96e3b1ce50cf642255ff9b2363a6ab64560..f0c42b14ee257c6bc995923d4012962252fb406e 100755 (executable)
@@ -130,13 +130,6 @@ function hydra_system_upgrade_upgrade {
     exit 1
   fi
 
-  hydra_system_upgrade_stage cleanup
-}
-
-# Cleanup procedures
-function hydra_system_upgrade_cleanup {
-  apt-get autoremove -y
-  apt-get clean
   hydra_system_upgrade_stage custom
 }
 
@@ -153,7 +146,28 @@ function hydra_system_upgrade_custom {
     fi
   fi
 
+  if [ "$nextrelease" == "jessie" ]; then
+    # We're using a masterless puppet setup, so no agent
+    apt-get install puppet-common
+    apt-get purge puppet
+
+    # Purge old monitoring infrastructure
+    apt-get purge 'munin*' 'nagios*'
+    rm -rf /etc/nagios* /etc/munin* /etc/munin* /usr/share/munin*
+
+    # Cleanup old scripts
+    rm -f /usr/local/sbin/check-puppetd.sh
+    rm -f remove /etc/cron.d/puppetd
+  fi
+
   hydractl trac-upgrade
+  hydra_system_upgrade_stage cleanup
+}
+
+# Cleanup procedures
+function hydra_system_upgrade_cleanup {
+  apt-get autoremove --purge -y
+  apt-get clean
 }
 
 # Initialize