1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix glorytun settings

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-01-19 09:55:29 +01:00
parent 0255db095d
commit 98a3b7b8d7

View file

@ -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