Commit ab1eeee5 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Thomas Gambier

obs/slapos: Remove only configuration and logs on purge

Policy does not seems to enforce data removal on purge:

https://www.debian.org/doc/debian-policy/ch-files.html

So let's keep data like supplied software and deployed instances.

Also add a fix if ucf command not present.

See merge request !208Co-authored-by: Thomas Gambier's avatarThomas Gambier <thomas.gambier@nexedi.com>
parent e5a4f34c
Pipeline #38576 failed with stage
in 0 seconds
...@@ -5,10 +5,10 @@ set -e ...@@ -5,10 +5,10 @@ set -e
case "$1" in case "$1" in
purge) purge)
ucf --purge /etc/opt/slapos/slapos.cfg command -v ucf >/dev/null && ucf --purge /etc/opt/slapos/slapos.cfg
rm -rf /var/opt/slapos/ /srv/slapgrid/ /opt/slapgrid/ \ rm -rf /var/opt/slapos/ /etc/opt/slapos/ /opt/slapos/
/etc/opt/slapos/ /opt/slapos/ echo "Note: purging slapos-node removed the configuration files and the logs. If you want to also remove the data, run 'rm -rf /opt/slapgrid /srv/slapgrid'."
;; ;;
remove) remove)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment