File: barbican-common.postrm.in

package info (click to toggle)
barbican 1%3A11.0.0-3%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,504 kB
  • sloc: python: 44,019; sh: 953; makefile: 70
file content (25 lines) | stat: -rwxr-xr-x 659 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -e

#PKGOS-INCLUDE#

if [ "$1" = "purge" ] ; then
	# Purge the db
	pkgos_dbc_postrm barbican barbican-common $@

	# Purge config files copied in postinst
	for i in barbican.conf barbican-admin-paste.ini barbican-api.conf barbican-api-paste.ini barbican-functional.conf policy.json api_audit_map.conf ; do
		rm -f /etc/barbican/$i
	done
	# and the folders
	rmdir --ignore-fail-on-non-empty /etc/barbican || true

	echo "Purging barbican. Backup of /var/lib/barbican can be found at /var/lib/barbican.tar.bz2" >&2
	[ -e /var/lib/barbican ] && rm -rf /var/lib/barbican
	[ -e /var/log/barbican ] && rm -rf /var/log/barbican
fi

#DEBHELPER#

exit 0