diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 0df040c..803ae86 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -26,7 +26,7 @@ GLORYTUN_UDP_VERSION="3622f928caf03709c4031a34feec85c623bc5281" #MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2" MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7" OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" -OMR_ADMIN_VERSION="af3b0d55aed7341c2e9e8f5012fc07300e48a8d0" +OMR_ADMIN_VERSION="c64b8e332407b0c8c413330c36409955d9249512" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" #V2RAY_VERSION="v1.1.0" V2RAY_VERSION="v1.2.0-8-g59b8f4f" diff --git a/omr-service b/omr-service index ecb1568..ec37291 100755 --- a/omr-service +++ b/omr-service @@ -53,14 +53,16 @@ _lan_route() { _gre_tunnels() { . "$(readlink -f "/etc/shorewall/params.vpn")" for intf in /etc/openmptcprouter-vps-admin/intf/*; do - . "$(readlink -f "$intf")" - iface="$(basename $intf)" - if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then - ip tunnel del $iface 2>&1 >/dev/null - ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR - ip link set $iface up - ip addr add $LOCALIP dev $iface - ip route add $NETWORK dev $iface 2>&1 >/dev/null + if [ -f "$intf" ]; then + . "$(readlink -f "$intf")" + iface="$(basename $intf)" + if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then + ip tunnel del $iface 2>&1 >/dev/null + ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR + ip link set $iface up + ip addr add $LOCALIP dev $iface + ip route add $NETWORK dev $iface 2>&1 >/dev/null + fi fi done }