bin/gitcert

9 lines
331 B
Plaintext
Raw Normal View History

2022-04-21 22:30:57 +02:00
#!/bin/bash
#
if [[ $UID != 0 ]]; then
sudo $0
else
cp /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.orig-git
echo $(echo -n | openssl s_client -showcerts -connect mount-mockery.de:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p') >> /etc/ssl/certs/ca-certificates.crt
fi