Adding hook to remove ssl-cert-snakeoil by default.

This commit is contained in:
Daniel Baumann 2013-06-05 22:22:57 +02:00
parent a486a29f80
commit 24cfdfc6a3
2 changed files with 14 additions and 0 deletions

View File

@ -507,6 +507,7 @@ Set_defaults ()
remove-openssh-server-host-keys \
remove-python-py \
remove-temporary-files \
remove-ssl-cert-snakeoil \
remove-udev-persistent-cd-rules \
remove-udev-persistent-net-rules \
remove-systemd-machine-id \

View File

@ -0,0 +1,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