mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-21 07:51:26 +02:00
trying to fix compatibility with mawk
This commit is contained in:
@@ -446,7 +446,7 @@ extract_altnames() {
|
|||||||
reqtext="$( <<<"${csr}" openssl req -noout -text )"
|
reqtext="$( <<<"${csr}" openssl req -noout -text )"
|
||||||
if <<<"${reqtext}" grep -q '^[[:space:]]*X509v3 Subject Alternative Name:[[:space:]]*$'; then
|
if <<<"${reqtext}" grep -q '^[[:space:]]*X509v3 Subject Alternative Name:[[:space:]]*$'; then
|
||||||
# SANs used, extract these
|
# SANs used, extract these
|
||||||
altnames="$( <<<"${reqtext}" awk '/^[[:space:]]*X509v3 Subject Alternative Name:[[:space:]]*$/{print;getline;print;}' | tail -n1 )"
|
altnames="$( <<<"${reqtext}" awk '/X509v3 Subject Alternative Name:/{print;getline;print;}' | tail -n1 )"
|
||||||
# split to one per line:
|
# split to one per line:
|
||||||
# shellcheck disable=SC1003
|
# shellcheck disable=SC1003
|
||||||
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"
|
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"
|
||||||
|
|||||||
Reference in New Issue
Block a user