From 7ae378fbdd1f68d636cfa605fd23c110a9f15c78 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 20 May 2021 11:47:59 +0200 Subject: [PATCH] Use double parentheses for arithmetic expression (#186) --- adguard/rootfs/etc/cont-init.d/adguard.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adguard/rootfs/etc/cont-init.d/adguard.sh b/adguard/rootfs/etc/cont-init.d/adguard.sh index e8ca709..e8c348d 100644 --- a/adguard/rootfs/etc/cont-init.d/adguard.sh +++ b/adguard/rootfs/etc/cont-init.d/adguard.sh @@ -25,15 +25,15 @@ yq write --inplace "${CONFIG}" \ # Bump schema version in case this is an upgrade path schema_version=$(yq read "${CONFIG}" schema_version) -if bashio::var.has_value "${schema_version}"; then - if [[ "${schema_version-0}" -eq 7 ]]; then +if bashio::var.has_value "${schema_version+}"; then + if (( schema_version == 7 )); then # Clean up old interface bind formats yq delete --inplace "${CONFIG}" dns.bind_host yq write --inplace "${CONFIG}" schema_version 8 fi # Warn if this is an upgrade from below schema version 7, skip further process - if [[ "${schema_version}" -lt 7 ]]; then + if (( schema_version < 7 )); then bashio::warning bashio::warning "AdGuard Home needs to update its configuration schema" bashio::warning "you might need to restart he add-on once more to complete"