diff --git a/rpm/minerva.spec.in b/rpm/minerva.spec.in index 2edcdf292154137850bb234c22e28361f72d51ac..99556fd49b92b3e7868ec55af2518d670e67c693 100644 --- a/rpm/minerva.spec.in +++ b/rpm/minerva.spec.in @@ -41,10 +41,12 @@ if ! su - postgres -c "psql --dbname map_viewer -q -c '\q'" 2> /dev/null; then fi %preun -p /bin/bash -# save version information of the old package to make sure we run the correct DB-update script after installation if [ $1 == 1 ]; then + # save version information of the old package to make sure we run the correct DB-update script after installation mkdir -p %{_sharedstatedir}/rpm-state/%{name} echo -n %{version} > %{_sharedstatedir}/rpm-state/%{name}/OLD_VERSION + # remove old unpacked ("exploded") directory of war file + rm -rf %{_sharedstatedir}/tomcat/webapps/%{name} fi %posttrans -p /bin/bash