]> git.armaanb.net Git - asd-repo.git/blob - core/libressl/files/update-certdata.sh
libressl: skip updating cert if not root
[asd-repo.git] / core / libressl / files / update-certdata.sh
1 #!/bin/sh -e
2
3 if [ -w /etc/ssl/cacert.pem ]; then
4     cd /etc/ssl && {
5         curl -LO https://curl.haxx.se/ca/cacert.pem
6         mv -f cacert.pem cert.pem
7         printf '%s\n' "${0##*/}: updated cert.pem"
8     }
9 else
10     printf "Skipping updating certdata as /etc/ssl/cacert.pem is not writable\n"
11 fi