if inside https functions
This commit is contained in:
parent
1b1d94724b
commit
5787bf6fca
1 changed files with 22 additions and 18 deletions
8
cd.sh
8
cd.sh
|
@ -15,12 +15,12 @@ cd_main () {
|
|||
cd_set_packages_repositories
|
||||
cd_set_packages_configuration
|
||||
cd_write_ca_certificates
|
||||
[ "${CD_CA}" ] && cd_set_https_verification_off
|
||||
cd_set_https_verification_off
|
||||
cd_update_packages_catalog
|
||||
cd_install_packages_tools
|
||||
cd_install_ca_certificates
|
||||
cd_update_ca_certificates
|
||||
[ "${CD_CA}" ] && cd_set_https_verification_on
|
||||
cd_set_https_verification_on
|
||||
cd_update_packages_catalog
|
||||
cd_upgrade_packages
|
||||
cd_install_git
|
||||
|
@ -175,6 +175,7 @@ local text
|
|||
}
|
||||
|
||||
cd_set_https_verification_off () {
|
||||
if [ "${CD_CA}" ] ; then
|
||||
cd_step "Set HTTPS verification off"
|
||||
case "${CD_OS_NAME}" in
|
||||
"debian")
|
||||
|
@ -189,6 +190,7 @@ sslverify=False
|
|||
;;
|
||||
*) cd_error_os "cd_set_https_verification_off" ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
cd_update_packages_catalog () {
|
||||
|
@ -224,12 +226,14 @@ cd_update_ca_certificates () {
|
|||
}
|
||||
|
||||
cd_set_https_verification_on () {
|
||||
if [ "${CD_CA}" ] ; then
|
||||
cd_step "Set HTTPS verification on"
|
||||
case "${CD_OS_NAME}" in
|
||||
"debian") cd_rm "/etc/apt/apt.conf.d/https" ;;
|
||||
"alma") cd_rm "/etc/dnf/dnf.conf.d/https.conf" ;;
|
||||
*) cd_error_os "cd_set_https_verification_on" ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
cd_upgrade_packages () {
|
||||
|
|
Loading…
Reference in a new issue