mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
No add empty key
This commit is contained in:
parent
6896c68a90
commit
037570a286
1 changed files with 3 additions and 3 deletions
|
@ -229,7 +229,7 @@ _set_config_from_vps() {
|
|||
[ -z "$shadowsocks_disabled" ] && shadowsocks_disabled=0
|
||||
ss_key="$(echo "$vps_config" | jsonfilter -q -e '@.shadowsocks.key')"
|
||||
ss_key="$(echo $ss_key | sed 's/-/+/g; s/_/\//g;')"
|
||||
if [ "$ss_key" != "$(uci -q get shadowsocks-libev.sss0.key)" ]; then
|
||||
if [ -n "$ss_key" ] && [ "$ss_key" != "$(uci -q get shadowsocks-libev.sss0.key)" ]; then
|
||||
ss_method="$(echo "$vps_config" | jsonfilter -q -e '@.shadowsocks.method')"
|
||||
ss_port="$(echo "$vps_config" | jsonfilter -q -e '@.shadowsocks.port')"
|
||||
[ -z "$ss_port" ] && ss_port=65101
|
||||
|
@ -248,7 +248,7 @@ _set_config_from_vps() {
|
|||
|
||||
# Glorytun settings
|
||||
glorytun_key="$(echo "$vps_config" | jsonfilter -q -e '@.glorytun.key')"
|
||||
if [ "$glorytun_key" != "$(uci -q get glorytun.vpn.key)" ]; then
|
||||
if [ -n "$glorytun_key" ] && [ "$glorytun_key" != "$(uci -q get glorytun.vpn.key)" ]; then
|
||||
vpn="$(uci -q get openmptcprouter.settings.vpn)"
|
||||
glorytun_state=0
|
||||
if [ "$vpn" = "glorytun_tcp" ]; then
|
||||
|
@ -284,7 +284,7 @@ _set_config_from_vps() {
|
|||
|
||||
# MLVPN settings
|
||||
mlvpn_key="$(echo "$vps_config" | jsonfilter -q -e '@.mlvpn.key')"
|
||||
if [ "$mlvpn_key" != "$(uci -q get mlvpn.general.password)" ]; then
|
||||
if [ -n "$mlvpn_key" ] && [ "$mlvpn_key" != "$(uci -q get mlvpn.general.password)" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set mlvpn.general.password=$mlvpn_key
|
||||
commit mlvpn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue