ca/update

This commit is contained in:
Marc Beninca 2024-09-08 20:31:35 +02:00
parent 958fb45c09
commit 8797e27dad
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -845,6 +845,25 @@ spcd_f_ca_install() {
spcd_f_pm_pkg_install "ca-certificates"
}
spcd_f_ca_update() {
spcd_step "Update certificates"
case "${SPCD_OS_ID}" in
"${SPCD_OS_ARCH}" | \
"${SPCD_OS_ALMA}" | \
"${SPCD_OS_FEDORA}" | \
"${SPCD_OS_ROCKY}")
spcd_run update-ca-trust
;;
"${SPCD_OS_ALPINE}" | \
"${SPCD_OS_DEBIAN}" | \
"${SPCD_OS_OPENSUSE}" | \
"${SPCD_OS_UBUNTU}")
spcd_run update-ca-certificates
;;
*) ;;
esac
}
# ╭───┬──────────────────────╮
# │ f │ pm = package manager │
# ╰───┴──────────────────────╯
@ -1360,25 +1379,6 @@ spcd_step__ca_write_certificates() {
spcd_ca "write" "${root}"
}
spcd_step__ca_update_certificates() {
spcd_step "Update certificates"
case "${SPCD_OS_ID}" in
"${SPCD_OS_ARCH}" | \
"${SPCD_OS_ALMA}" | \
"${SPCD_OS_FEDORA}" | \
"${SPCD_OS_ROCKY}")
spcd_run update-ca-trust
;;
"${SPCD_OS_ALPINE}" | \
"${SPCD_OS_DEBIAN}" | \
"${SPCD_OS_OPENSUSE}" | \
"${SPCD_OS_UBUNTU}")
spcd_run update-ca-certificates
;;
*) ;;
esac
}
# ╭───┬──────────╮
# │ s │ packages │
# ╰───┴──────────╯
@ -1596,7 +1596,7 @@ spcd_main() {
spcd_step_in "CA"
spcd_f_ca_install
spcd_step__ca_write_certificates
spcd_step__ca_update_certificates
spcd_f_ca_update
spcd_step_out
# packages
spcd_step_in "Packages"