mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-05 13:38:47 +02:00
Update 30-keygen
This commit is contained in:
@@ -15,24 +15,24 @@ if bashio::config.true 'use_own_certs'; then
|
|||||||
echo "... adding ssl certs in files"
|
echo "... adding ssl certs in files"
|
||||||
NGINXFILE="/defaults/default"
|
NGINXFILE="/defaults/default"
|
||||||
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 /ssl/${CERTFILE};" $NGINXFILE
|
||||||
sed -i "$LINE d" $NGINXFILE
|
sed -i "$LINE d" $NGINXFILE
|
||||||
|
|
||||||
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 /ssl/${KEYFILE};" $NGINXFILE
|
||||||
sed -i "$LINE d" $NGINXFILE
|
sed -i "$LINE d" $NGINXFILE
|
||||||
|
|
||||||
#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 /ssl/${CERTFILE};" $NGINXFILE && \
|
||||||
sed -i "$LINE d" $NGINXFILE
|
sed -i "$LINE d" $NGINXFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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 /ssl/${KEYFILE};" $NGINXFILE && \
|
||||||
sed -i "$LINE d" $NGINXFILE
|
sed -i "$LINE d" $NGINXFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user