Skip to content

Commit

Permalink
πŸš‘ Fix invalid yq structure in NGINX https logic (#237)
Browse files Browse the repository at this point in the history
* πŸš‘ Fix invalid yq structure in NGINX https logic

* Corrected default
  • Loading branch information
frenck authored Aug 12, 2021
1 parent d0c8355 commit f4d9418
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adguard/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ declare adguard_protocol=http
declare tls_port

# Figure out port settings from AdGuard
if bashio::var.true "$(yq read /data/adguard/AdGuardHome.yaml tls.enabled)";
if bashio::var.true "$(yq e '.tls.enabled' /data/adguard/AdGuardHome.yaml)";
then
tls_port=$(yq read /data/adguard/AdGuardHome.yaml tls.port_https)
tls_port=$(yq e '.tls.port_https // ""' /data/adguard/AdGuardHome.yaml)
if bashio::var.has_value "${tls_port}" && [[ "${tls_port}" -ne 0 ]]; then
adguard_port="${tls_port}"
adguard_protocol=https
Expand Down

0 comments on commit f4d9418

Please sign in to comment.