summaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@oath.com>2017-12-04 22:40:24 +0000
committerArnstein Ressem <aressem@oath.com>2017-12-04 22:40:24 +0000
commitf4bc7834e79d925c483686678adf2632316d9225 (patch)
tree307354c96cc23a8768823cd38c204f562e941391 /dist
parent1f4e8cdcec0745047e7a99a672554844d809d715 (diff)
Only delete user and profile if uninstalling. Keep changes to config files.
Diffstat (limited to 'dist')
-rw-r--r--dist/vespa.spec9
1 files changed, 7 insertions, 2 deletions
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