ca/update

This commit is contained in:
Marc Beninca 2024-08-26 11:11:26 +02:00
parent 124549cd8b
commit f3c6f7a1cf
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -616,23 +616,8 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
;; ;;
*) ;; *) ;;
esac esac
case "${SPCD_OS_ID}" in
"${SPCD_OS_ARCH}" | \
"${SPCD_OS_ALMA}" | \
"${SPCD_OS_FEDORA}" | \
"${SPCD_OS_ROCKY}")
SPCD_CMD_CA="update-ca-trust"
;;
"${SPCD_OS_ALPINE}" | \
"${SPCD_OS_DEBIAN}" | \
"${SPCD_OS_OPENSUSE}" | \
"${SPCD_OS_UBUNTU}")
SPCD_CMD_CA="update-ca-certificates"
;;
*) ;;
esac
spcd_split spcd_split
spcd_os_printenv "SPCD_CA_ROOT" "SPCD_CMD_CA" spcd_os_printenv "SPCD_CA_ROOT"
# set package manager # set package manager
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_ALPINE}") "${SPCD_OS_ALPINE}")
@ -1068,7 +1053,21 @@ spcd_ca_write_certificates() {
spcd_ca_update_certificates() { spcd_ca_update_certificates() {
spcd_step "Update certificates" spcd_step "Update certificates"
${SPCD_CMD_CA} case "${SPCD_OS_ID}" in
"${SPCD_OS_ARCH}" | \
"${SPCD_OS_ALMA}" | \
"${SPCD_OS_FEDORA}" | \
"${SPCD_OS_ROCKY}")
update-ca-trust
;;
"${SPCD_OS_ALPINE}" | \
"${SPCD_OS_DEBIAN}" | \
"${SPCD_OS_OPENSUSE}" | \
"${SPCD_OS_UBUNTU}")
update-ca-certificates
;;
*) ;;
esac
} }
# ╭───────┬──────────╮ # ╭───────┬──────────╮