Skip to content

Commit cd4c13d

Browse files
authored
Grep carefully for 'END CERTIFICATE' (hestiacp#1981)
* Grep carefully for 'END CERTIFICATE' @dpeca and @myvesta * Fix sysntax error
1 parent 6eaf813 commit cd4c13d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ All notable changes to this project will be documented in this file.
77

88
### Bugfixes
99

10-
- Fix #1961 Renewal Apache2 only SSL certificate fails
10+
- Fix #1961 Renewal Apache2 only SSL certificate fails
11+
- Fixed #1956 to prevent reset of defined webmail client.
12+
- Explicitly disable cron reports #1978
13+
- Fixed an issue where in rare cases certificate failed to install @dpeca and @myvesta
1114

1215
## [1.4.5] - Service release
1316

bin/v-add-letsencrypt-domain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ if [[ "$status" -ne 200 ]]; then
474474
fi
475475

476476
# Splitting up downloaded pem
477-
crt_end=$(grep -n END $ssl_dir/$domain.pem |head -n1 |cut -f1 -d:)
477+
crt_end=$(grep -n 'END CERTIFICATE' $ssl_dir/$domain.pem |head -n1 |cut -f1 -d:)
478478
head -n $crt_end $ssl_dir/$domain.pem > $ssl_dir/$domain.crt
479479

480480
pem_lines=$(wc -l $ssl_dir/$domain.pem |cut -f 1 -d ' ')
481-
ca_end=$(grep -n "BEGIN" $ssl_dir/$domain.pem |tail -n1 |cut -f 1 -d :)
481+
ca_end=$(grep -n 'BEGIN CERTIFICATE' $ssl_dir/$domain.pem |tail -n1 |cut -f 1 -d :)
482482
ca_end=$(( pem_lines - crt_end + 1 ))
483483
tail -n $ca_end $ssl_dir/$domain.pem > $ssl_dir/$domain.ca
484484

0 commit comments

Comments
 (0)