fix: nginx entrypoint - use sed instead of grep -oP for Alpine compat
This commit is contained in:
@@ -21,7 +21,7 @@ for ssl_conf in "$CONF_AVAILABLE"/*.ssl.conf; do
|
|||||||
http_conf="$CONF_AVAILABLE/$base.http.conf"
|
http_conf="$CONF_AVAILABLE/$base.http.conf"
|
||||||
|
|
||||||
# CERT_DOMAIN в первой строке: # CERT_DOMAIN=example.ru
|
# CERT_DOMAIN в первой строке: # CERT_DOMAIN=example.ru
|
||||||
cert_domain="$(head -1 "$ssl_conf" | grep -oP '(?<=# CERT_DOMAIN=).+')" || true
|
cert_domain="$(head -1 "$ssl_conf" | sed -n 's/.*# CERT_DOMAIN=\(.*\)/\1/p')" || true
|
||||||
|
|
||||||
if [ -n "$cert_domain" ] && [ -f "$CERT_DIR/$cert_domain/fullchain.pem" ]; then
|
if [ -n "$cert_domain" ] && [ -f "$CERT_DIR/$cert_domain/fullchain.pem" ]; then
|
||||||
ln -sf "$ssl_conf" "$CONF_D/$base.ssl.conf"
|
ln -sf "$ssl_conf" "$CONF_D/$base.ssl.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user