Skip to content
Snippets Groups Projects

remove directory with contents of unpacked war file on uninstall

1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -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
Loading