1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Support any subnet for default gateway

This commit is contained in:
Bapt Abl 2021-11-11 18:20:45 +01:00
parent 0a05dfb661
commit b41ad50c5b
No known key found for this signature in database
GPG key ID: 340828612290B92C

View file

@ -327,7 +327,7 @@ if [ "$1" != restart ]; then
done
old_internet_device=$(ynh_setting_get hotspot internet_device)
new_internet_device=$(ip --json route | jq -r '.[] | select(.dst == "default") | .dev')
new_internet_device=$(ip route get 1.2.3.4 | awk '{ print $5; }')
# Switch the NAT interface if there is a VPN
ip link show dev tun0 &> /dev/null