mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-20 03:28:11 +01:00
Update 29-ssl_config
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user