diff options
Diffstat (limited to 'README')
-rwxr-xr-x | README | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,7 +1,22 @@ #!/bin/bash # to be run as root ... -set -o +set -e + +# check and possibly install root-certificate +if ! curl -o /dev/null "https://jeti100.ioq.uni-jena.de/" 2> /dev/null +then + cert="$(curl -o - "http://jeti100.ioq.uni-jena.de/statisch/ca.crt" 2> /dev/null)" + if ! echo "${cert}" | \ + sha512sum | \ + grep -q "^c1a9da72183ef6fd87deb506dd93ea3e6247d28ec0720914c97a80369e9e81cb7e9f7ce37fe063756880eb84f402fec20ccb3c2c4fb46f5f707a022f803372be -\$" + then + >&2 echo 'falsches CA-Zertifikat heruntergeladen' + exit 1 + fi + echo "${cert}" > /usr/share/ca-certificates/trust-source/anchors/jeti100.crt + trust export-compat +fi # import keys: pacman-key --add <(curl -o - "https://arch.eckner.net/archlinuxewe/masterkeys.gpg") |