Skip to content

Commit

Permalink
fix if check for non-empty variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ilario committed Dec 30, 2024
1 parent c663032 commit fd5265c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
setup_hotspot_watchping() {
ifname="client-wwan"
gw=$(ip r show default dev $ifname | while read default via ip rest; do [[ $via == "via" ]] && echo $ip && break; done)
if [ -n gw ]; then
if [ -n "$gw" ]; then
uci set system.hotspot_watchping=watchping
uci set system.hotspot_watchping.interface=$ifname
uci set system.hotspot_watchping.timeout=2m
Expand Down

0 comments on commit fd5265c

Please sign in to comment.