mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 21:24:20 +01:00
Allow use of ports other than 8123 in HA (#2307)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
@@ -13,6 +13,8 @@ KEYFILE=$(bashio::config 'keyfile')
|
||||
CERTFILE=$(bashio::config 'certfile')
|
||||
HSTS=$(bashio::config 'hsts')
|
||||
|
||||
HA_PORT=$(bashio::core.port)
|
||||
|
||||
# Generate dhparams
|
||||
if ! bashio::fs.file_exists "${DHPARAMS_PATH}"; then
|
||||
bashio::log.info "Generating dhparams (this will take some time)..."
|
||||
@@ -52,6 +54,7 @@ fi
|
||||
sed -i "s#%%FULLCHAIN%%#$CERTFILE#g" /etc/nginx.conf
|
||||
sed -i "s#%%PRIVKEY%%#$KEYFILE#g" /etc/nginx.conf
|
||||
sed -i "s/%%DOMAIN%%/$DOMAIN/g" /etc/nginx.conf
|
||||
sed -i "s/%%HA_PORT%%/$HA_PORT/g" /etc/nginx.conf
|
||||
|
||||
[ -n "$HSTS" ] && HSTS="add_header Strict-Transport-Security \"$HSTS\" always;"
|
||||
sed -i "s/%%HSTS%%/$HSTS/g" /etc/nginx.conf
|
||||
|
||||
Reference in New Issue
Block a user