Skip to content

Commit 5bcdf37

Browse files
committed
Push fix due to double end certificate in let's encrypt ca.
1 parent b974b79 commit 5bcdf37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ ca_end=$(grep -n "BEGIN" $ssl_dir/$domain.pem |tail -n1 |cut -f 1 -d :)
231231
ca_end=$(( pem_lines - crt_end + 1 ))
232232
tail -n $ca_end $ssl_dir/$domain.pem > $ssl_dir/$domain.ca
233233

234+
# Temporary fix for double "END CERTIFICATE"
235+
if [[ $(head -n 1 $ssl_dir/$domain.ca) = "-----END CERTIFICATE-----" ]]; then
236+
sed -i '1,2d' $ssl_dir/$domain.ca
237+
fi
238+
234239
# Adding SSL
235240
ssl_home=$(search_objects 'web' 'LETSENCRYPT' 'yes' 'SSL_HOME')
236241
$BIN/v-delete-web-domain-ssl $user $domain > /dev/null 2>&1

0 commit comments

Comments
 (0)