-# cache dir moved
-%triggerun -- %{name} < 0.4.0-0.20050618.3
-# FIXME could suffer too many arguments error
-rm -f /var/lib/%{name}/*
-
-%triggerpostun -- %{name} < 0.4.0-0.20060206.0.2
-# rescue app config
-if [ -f /etc/%{name}/core.conf.rpmsave ]; then
- mv -f %{_sysconfdir}/core.conf{,.rpmnew}
- mv -f /etc/%{name}/core.conf.rpmsave %{_sysconfdir}/core.conf
-fi
-# migrate from apache-config macros
-if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
- if [ -d /etc/apache/webapps.d ]; then
- cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
- cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/apache.conf
- fi
-
- if [ -d /etc/httpd/webapps.d ]; then
- cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
- cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
- fi
- rm -f /etc/%{name}/apache.conf.rpmsave
-fi
-
-# migrating from earlier apache-config?
-if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
- rm -f /etc/apache/conf.d/99_%{name}.conf
- /usr/sbin/webapp register apache %{_webapp}
- %service -q apache reload
-fi
-if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
- rm -f /etc/httpd/httpd.conf/99_%{name}.conf
- /usr/sbin/webapp register httpd %{_webapp}
- %service -q httpd reload
-fi
-