diff --git a/func/deb_sys.sh b/func/deb_sys.sh index ff63751..cfaa3ee 100644 --- a/func/deb_sys.sh +++ b/func/deb_sys.sh @@ -719,7 +719,7 @@ do_deb_sys_cert_install(){ if [ -f "$cert_crt" ]; then # On extrait le DEUXIÈME certificat du fichier (l'intermédiaire) # On utilise awk pour isoler le second bloc -----BEGIN...END----- - awk 'split($0,a,"-----END CERTIFICATE-----"){print a[1] "-----END CERTIFICATE-----"}' "$cert_crt" | tail -n +2 | awk '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/' > "$inter_target" + awk '/-----BEGIN CERTIFICATE-----/{i++} i==2' "$cert_crt" > "$inter_target" if [ -s "$inter_target" ]; then msg_success "Certificat intermédiaire extrait avec succès."