mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Check if dsvpn exist before running script
This commit is contained in:
parent
9309d5e376
commit
22bac88c36
1 changed files with 1 additions and 1 deletions
|
@ -1873,7 +1873,7 @@ _set_config_from_vps() {
|
|||
# DSVPN settings
|
||||
dsvpn_key="$(echo "$vps_config" | jsonfilter -q -e '@.dsvpn.key')"
|
||||
dsvpn_port="$(echo "$vps_config" | jsonfilter -q -e '@.dsvpn.port')"
|
||||
if [ -n "$(uci -q get dsvpn.vpn)" ] && (([ -n "$dsvpn_key" ] && [ "$dsvpn_key" != "$(uci -q get dsvpn.vpn.key)" ]) || ([ -n "$dsvpn_port" ] && [ "$dsvpn_port" != "$(uci -q get dsvpn.vpn.port)" ])); then
|
||||
if [ -f /etc/init.d/dsvpn ] && [ -n "$(uci -q get dsvpn.vpn)" ] && (([ -n "$dsvpn_key" ] && [ "$dsvpn_key" != "$(uci -q get dsvpn.vpn.key)" ]) || ([ -n "$dsvpn_port" ] && [ "$dsvpn_port" != "$(uci -q get dsvpn.vpn.port)" ])); then
|
||||
dsvpn_state=0
|
||||
if [ "$vpn" = "dsvpn" ]; then
|
||||
dsvpn_state=1
|
||||
|
|
Loading…
Reference in a new issue