Merge pull request 'Fixe erreur script sous manjaro' (#5) from issue-4 into master

Reviewed-on: #5
This commit is contained in:
wpetit 2023-03-01 10:12:33 +01:00
commit 6c5c580156
1 changed files with 12 additions and 4 deletions

16
resources/com/cadoles/common/add-letsencrypt-ca.sh Normal file → Executable file
View File

@ -2,10 +2,18 @@
set -eo pipefail
DESTDIR=/usr/local/share/ca-certificates
if [ ! -d "$DESTDIR" ]; then
DESTDIR=/etc/pki/ca-trust/source/anchors
fi
declare -a DESTDIR_PATHS=(
"/usr/local/share/ca-certificates"
"/etc/ca-certificates/trust-source/anchors"
"/etc/pki/ca-trust/source/anchors"
)
for path in "${DESTDIR_PATHS[@]}"; do
if [ -d "$path" ]; then
DESTDIR=$path
break
fi
done
UPDATE_CERTS_CMD=update-ca-certificates
if [ -z "$(which $UPDATE_CERTS_CMD)" ]; then