mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 15:45:56 +02:00
Update 29-ssl_config
This commit is contained in:
@@ -23,16 +23,17 @@ NGINXFILE="/defaults/default"
|
|||||||
#Sets certificates
|
#Sets certificates
|
||||||
NGINXFILE="/config/nginx/site-confs/default"
|
NGINXFILE="/config/nginx/site-confs/default"
|
||||||
if [ -f $NGINXFILE ]; then
|
if [ -f $NGINXFILE ]; then
|
||||||
LINE=$(sed -n '/cert.crt/=' $NGINXFILE)
|
LINE=$(sed -n '/cert.crt/=' $NGINXFILE) && \
|
||||||
sed -i "$LINE a ssl_certificate ${CERTFILE};" $NGINXFILE
|
sed -i "$LINE a ssl_certificate ${CERTFILE};" $NGINXFILE && \
|
||||||
sed -i "$LINE d" $NGINXFILE
|
sed -i "$LINE d" $NGINXFILE || true
|
||||||
fi
|
fi || true
|
||||||
|
|
||||||
if [ -f $NGINXFILE ]; then
|
if [ -f $NGINXFILE ]; then
|
||||||
LINE=$(sed -n '/cert.key/=' $NGINXFILE)
|
LINE=$(sed -n '/cert.key/=' $NGINXFILE) && \
|
||||||
sed -i "$LINE a ssl_certificate_key ${CERTFILE};" $NGINXFILE
|
sed -i "$LINE a ssl_certificate_key ${CERTFILE};" $NGINXFILE && \
|
||||||
sed -i "$LINE d" $NGINXFILE
|
sed -i "$LINE d" $NGINXFILE || true
|
||||||
fi
|
fi || true
|
||||||
|
|
||||||
bashio::log.info "... done"
|
bashio::log.info "... done"
|
||||||
rm /etc/cont-init.d/30-keygen
|
rm /etc/cont-init.d/30-keygen
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user