Commit 52f0ff03 authored by anarcat's avatar anarcat

don't go around destroying apache configs on upgrades or removal

the rationale for upgrades is obvious: even if the next package will
restore the link, the upgrade may fail and then all sites go
down. even if it doesn't fail, sites go down for the duration of the
upgrade: bad. this affects 1.x to 2.x upgrades.

the rationale for remove is that we don't completely destroy the data,
so the sites are expected to remain.

we also cleanup after ourselves in special corner cases
(abort-install, disappear) as well.
parent fd1f237e
......@@ -23,7 +23,7 @@ if [ "$DPKG_DEBUG" = "developer" ]; then
fi
case "$1" in
purge)
purge|abort-install|disappear)
# delete the aegir user
# http://wiki.debian.org/AccountHandlingInMaintainerScripts
if which deluser >/dev/null 2>&1 ; then
......@@ -35,14 +35,13 @@ case "$1" in
# unregister sudo config file
ucf --purge /etc/sudoers.d/aegir
rm -f /etc/sudoers.d/aegir
;;
remove|upgrade|abort-install|disappear)
# unregister apache config
( rm /etc/apache/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache force-reload ) || true
( rm /etc/apache2/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache2 force-reload ) || true
;;
abort-upgrade|failed-upgrade)
remove|upgrade|abort-upgrade|failed-upgrade)
# nothing to do here, especially: don't remove the configs!!
true
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment