summaryrefslogtreecommitdiff
path: root/share/hooks/0195-remove-ssl-cert-snakeoil.hook.chroot
blob: cdfe39d24b5e4b21b727cadca6e8bc76c62c0936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

set -e

# Remove ssl-cert snakeoil

if [ -e /etc/ssl/certs/ssl-cert-snakeoil.pem ]
then
	rm -f /etc/ssl/certs/$(openssl x509 -hash -noout -in /etc/ssl/certs/ssl-cert-snakeoil.pem)

	rm -f /etc/ssl/certs/ssl-cert-snakeoil.pem
	rm -f /etc/ssl/private/ssl-cert-snakeoil.key
fi