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