From 088931e9b74ce5c02bcd724936d5130a7abc53e5 Mon Sep 17 00:00:00 2001 From: MarkusMcNugen Date: Fri, 6 Apr 2018 18:33:04 -0400 Subject: [PATCH] Update iptables.sh --- qbittorrent/iptables.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qbittorrent/iptables.sh b/qbittorrent/iptables.sh index ce7c68f..aaa9fd5 100644 --- a/qbittorrent/iptables.sh +++ b/qbittorrent/iptables.sh @@ -70,13 +70,13 @@ if [[ "${DEBUG}" == "true" ]]; then fi # identify ip for docker bridge interface -docker_ip=$(ifconfig "${docker_interface}" | grep -P -o -m 1 '(?<=inet\saddr:)[^\s]+') +docker_ip=$(ifconfig "${docker_interface}" | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*") if [[ "${DEBUG}" == "true" ]]; then echo "[debug] Docker IP defined as ${docker_ip}" fi # identify netmask for docker bridge interface -docker_mask=$(ifconfig "${docker_interface}" | grep -P -o -m 1 '(?<=Mask:)[^\s]+') +docker_mask=$(ifconfig "${docker_interface}" | grep -o "netmask [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*") if [[ "${DEBUG}" == "true" ]]; then echo "[debug] Docker netmask defined as ${docker_mask}" fi