From 98a3b7b8d7883731ce7e4daa757fe6beaf04cccb Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 19 Jan 2020 09:55:29 +0100 Subject: [PATCH] Fix glorytun settings --- openmptcprouter/files/etc/init.d/openmptcprouter-vps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index 3d980f1ea..cc119004f 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -671,7 +671,7 @@ _set_config_from_vps() { # Glorytun settings glorytun_key="$(echo "$vps_config" | jsonfilter -q -e '@.glorytun.key')" glorytun_port="$(echo "$vps_config" | jsonfilter -q -e '@.glorytun.port')" - if [ -n "$glorytun_key" ] && [ "$glorytun_key" != "$(uci -q get glorytun.vpn.key)" ] && [ -n "$glorytun_port" ] && [ "$glorytun_port" != "$(uci -q get glorytun.vpn.port)" ]; then + if ([ -n "$glorytun_key" ] && [ "$glorytun_key" != "$(uci -q get glorytun.vpn.key)" ]) || ([ -n "$glorytun_port" ] && [ "$glorytun_port" != "$(uci -q get glorytun.vpn.port)" ]); then vpn="$(uci -q get openmptcprouter.settings.vpn)" glorytun_state=0 if [ "$vpn" = "glorytun_tcp" ]; then @@ -763,7 +763,7 @@ _set_config_from_vps() { # MLVPN settings mlvpn_key="$(echo "$vps_config" | jsonfilter -q -e '@.mlvpn.key')" - if [ -n "$mlvpn_key" ] && [ "$mlvpn_key" != "$(uci -q get mlvpn.general.password)" ]; then + if [ -n "$mlvpn_key" ] && [ "$mlvpn_key" != "$(uci -q get mlvpn.general.password)" ] && [ -f /etc/init.d/mlvpn ]; then vpn="$(uci -q get openmptcprouter.settings.vpn)" mlvpn_state=0 if [ "$vpn" = "mlvpn" ]; then