From df8f36d391c9fc97bc5bad48190be2affc99498e Mon Sep 17 00:00:00 2001 From: Stephan Wendel Date: Mon, 6 Nov 2023 18:06:55 +0100 Subject: [PATCH] fix: shellcheck error on L#111 Signed-off-by: Stephan Wendel --- libs/core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/core.sh b/libs/core.sh index 5595fa5..948aa63 100755 --- a/libs/core.sh +++ b/libs/core.sh @@ -108,7 +108,7 @@ function get_def_gw { if [ "$(cat /sys/class/net/wlan0/operstate)" == "up" ]; then default_gw="$(ip route | awk 'NR==1 {print $3}')" echo "${default_gw}" - if [ -z "$default_gw" ]; then + if [ -z "${default_gw}" ]; then log_msg "WARN: Cannot get the default gateway. Restarting service..." sleep 5 systemctl restart sonar.service