diff --git a/scripts/_common.sh b/scripts/_common.sh index d34d781..87d70ed 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,7 +13,9 @@ configure_network_interface_dnsmasq(){ # get the network interface name for IPv4 and IPv6 # note: echo the IP route command to prevent a crash if the server doesn't have any IPv4/6 + # shellcheck disable=SC2005 ipv4_interface=$(echo "$(ip -4 route get 1.2.3.4 2> /dev/null)" | head -n1 | grep -oP '(?<=dev )\w+' || true) + # shellcheck disable=SC2005 ipv6_interface=$(echo "$(ip -6 route get ::1.2.3.4 2> /dev/null)" | head -n1 | grep -oP '(?<=dev )\w+' || true) if [ -z "$ipv4_interface" ] && [ -z "$ipv6_interface" ]; then