From f4bc7834e79d925c483686678adf2632316d9225 Mon Sep 17 00:00:00 2001 From: Arnstein Ressem Date: Mon, 4 Dec 2017 22:40:24 +0000 Subject: Only delete user and profile if uninstalling. Keep changes to config files. --- dist/vespa.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'dist/vespa.spec') diff --git a/dist/vespa.spec b/dist/vespa.spec index ca6a9504401..dcfe5719650 100644 --- a/dist/vespa.spec +++ b/dist/vespa.spec @@ -195,13 +195,18 @@ exit 0 %postun %systemd_postun_with_restart vespa.service %systemd_postun_with_restart vespa-configserver.service -rm -f /etc/profile.d/vespa.sh -userdel vespa +if [ $1 -eq 0 ]; then # this is an uninstallation + rm -f /etc/profile.d/vespa.sh + userdel vespa +fi %files %defattr(-,vespa,vespa,-) %doc %{_prefix}/* +%config(noreplace) %{_prefix}/conf/logd/logd.cfg +%config(noreplace) %{_prefix}/conf/vespa/default-env.txt +%config(noreplace) %{_prefix}/etc/vespamalloc.conf %attr(644,root,root) /usr/lib/systemd/system/vespa.service %attr(644,root,root) /usr/lib/systemd/system/vespa-configserver.service -- cgit v1.2.3