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
# make a silent upgrade to new libc6
upgrade_libc () {
- DEBIAN_FRONTEND=noninteractive pkgupgrade libc6 libc6-dev tzdata udev
+ DEBIAN_FRONTEND=noninteractive pkgupgrade libc6 libc6-dev tzdata
}
# upgrade apache2/php5
upgrade_mysql () {
if pkg mysql-server || pkg mysql-server-5.0; then
pkgadd mysql-server
- pkgrm mysql-server-5.0
- /etc/init.d/mysql start
+ dpkg -P mysql-server-5.0
+ /etc/init.d/mysql restart
fi
}
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