From 2c11f824f48b9f6b6bff77e3f9f85ea5a6f0c467 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:26:20 +0200 Subject: [PATCH] Update 29-ssl_config --- nextcloud/root/etc/cont-init.d/29-ssl_config | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nextcloud/root/etc/cont-init.d/29-ssl_config b/nextcloud/root/etc/cont-init.d/29-ssl_config index 0fffe5b32..41b4e0121 100644 --- a/nextcloud/root/etc/cont-init.d/29-ssl_config +++ b/nextcloud/root/etc/cont-init.d/29-ssl_config @@ -23,16 +23,17 @@ NGINXFILE="/defaults/default" #Sets certificates NGINXFILE="/config/nginx/site-confs/default" if [ -f $NGINXFILE ]; then - LINE=$(sed -n '/cert.crt/=' $NGINXFILE) - sed -i "$LINE a ssl_certificate ${CERTFILE};" $NGINXFILE - sed -i "$LINE d" $NGINXFILE -fi + LINE=$(sed -n '/cert.crt/=' $NGINXFILE) && \ + sed -i "$LINE a ssl_certificate ${CERTFILE};" $NGINXFILE && \ + sed -i "$LINE d" $NGINXFILE || true +fi || true if [ -f $NGINXFILE ]; then - LINE=$(sed -n '/cert.key/=' $NGINXFILE) - sed -i "$LINE a ssl_certificate_key ${CERTFILE};" $NGINXFILE - sed -i "$LINE d" $NGINXFILE -fi + LINE=$(sed -n '/cert.key/=' $NGINXFILE) && \ + sed -i "$LINE a ssl_certificate_key ${CERTFILE};" $NGINXFILE && \ + sed -i "$LINE d" $NGINXFILE || true +fi || true + bashio::log.info "... done" rm /etc/cont-init.d/30-keygen else