mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix enabled check
This commit is contained in:
parent
3a90415d07
commit
af4d5483fa
2 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ _launch_quota() {
|
||||||
interface=$1
|
interface=$1
|
||||||
|
|
||||||
[ -z "$txquota" ] && [ -z "$rxquota" ] && [ -z "$ttquota" ] && return
|
[ -z "$txquota" ] && [ -z "$rxquota" ] && [ -z "$ttquota" ] && return
|
||||||
[ $enabled = 0 ] && return
|
[ "$enabled" = "0" ] && return
|
||||||
|
|
||||||
[ "$(uci get vnstat.@vnstat[-1].interface | grep $interface)" = "" ] && {
|
[ "$(uci get vnstat.@vnstat[-1].interface | grep $interface)" = "" ] && {
|
||||||
uci -q batch <<-EOF
|
uci -q batch <<-EOF
|
||||||
|
|
|
@ -46,7 +46,7 @@ _launch_tracker() {
|
||||||
config_get gateway "$1" gateway
|
config_get gateway "$1" gateway
|
||||||
|
|
||||||
[ -z "$ifname" ] || [ -z "$multipath" ] || [ "$multipath" = "off" ] && [ "$1" != "glorytun" ] && return
|
[ -z "$ifname" ] || [ -z "$multipath" ] || [ "$multipath" = "off" ] && [ "$1" != "glorytun" ] && return
|
||||||
[ $enabled = 0 ] && return
|
[ "${enabled}" = "0" ] && return
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
@ -103,8 +103,8 @@ _launch_shadowsocks_tracker() {
|
||||||
local disabled
|
local disabled
|
||||||
config_get disabled "$1" disabled 0
|
config_get disabled "$1" disabled 0
|
||||||
|
|
||||||
[ $enabled = 0 ] && return
|
[ "$enabled" = "0" ] && return
|
||||||
[ $disabled = 1 ] && return
|
[ "$disabled" = "1" ] && return
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue