@exec mkdir -p /var/run/munin && chown munin:munin /var/run/munin
@exec mkdir -p /var/log/munin-main && chown munin:munin /var/log/munin-main
@exec mkdir -p %D/www/data/munin && chown munin:munin %D/www/data/munin
@exec mkdir -p %D/var/munin && chown munin:munin %D/var/munin
bin/munin-cron
@unexec if cmp -s %D/etc/munin/templates/style.css %D/www/data/munin/style.css; then rm -f %D/www/data/munin/style.css; fi
@unexec if cmp -s %D/etc/munin/templates/logo.png %D/www/data/munin/logo.png; then rm -f %D/www/data/munin/logo.png; fi
@unexec if cmp -s %D/etc/munin/munin.conf.sample %D/etc/munin/munin.conf; then rm -f %D/etc/munin/munin.conf; fi
etc/munin/munin.conf.sample
etc/munin/templates/definitions.html
etc/munin/templates/logo.png
etc/munin/templates/munin-comparison-day.tmpl
etc/munin/templates/munin-comparison-month.tmpl
etc/munin/templates/munin-comparison-week.tmpl
etc/munin/templates/munin-comparison-year.tmpl
etc/munin/templates/munin-domainview.tmpl
etc/munin/templates/munin-nodeview.tmpl
etc/munin/templates/munin-overview.tmpl
etc/munin/templates/munin-serviceview.tmpl
etc/munin/templates/style.css
%%SITE_PERL%%/Munin.pm
share/munin/munin-graph
share/munin/munin-html
share/munin/munin-limits
share/munin/munin-update
www/cgi-bin/munin-cgi-graph
@unexec rm -f /var/run/munin/munin-*.lock
@unexec rmdir /var/run/munin 2>/dev/null || true
@unexec rmdir /var/log/munin-main 2>/dev/null || true
@unexec rmdir %D/www/data/munin 2>/dev/null || true
@unexec rmdir %D/www/data 2>/dev/null || true
@unexec rmdir %D/www/cgi-bin 2>/dev/null || true
@unexec rmdir %D/var/munin 2>/dev/null || true
@unexec rmdir %D/share/munin 2>/dev/null || true
@unexec rmdir %D/etc/munin/templates 2>/dev/null || true
@unexec rmdir %D/etc/munin 2>/dev/null || true
@unexec echo
@unexec echo '********************************************************************'
@unexec echo "If you want to *completely* remove munin-main, you have to"
@unexec echo
@unexec if [ -d %D/www/data/munin ]; then echo "    rm -rf %D/www/data/munin \\"; fi
@unexec if [ -d %D/var/munin ]; then ls -d %D/var/munin/* | grep -v plugin-state | fmt -40 | sed -e 's/^/           /' -e 's/$/ \\/'; fi
@unexec if [ -f %D/etc/munin/munin.conf ]; then echo "           %D/etc/munin/munin.conf \\"; fi
@unexec if [ -d %D/etc/munin/templates ]; then echo "           %D/etc/munin/templates \\"; fi
@unexec echo "           /var/log/munin-main"
@unexec echo
@unexec echo "If you have already deinstalled munin-node, you can also"
@unexec echo
@unexec echo "    rmdir %D/etc/munin %D/var/munin"
@unexec echo
@unexec echo "These files and directories have to be left on the system because"
@unexec echo "you may be performing an update. This process can't tell."
@unexec echo '********************************************************************'
@unexec echo
