mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Limit memory usage for v2ray
This commit is contained in:
parent
9a120ae502
commit
5881c303f4
1 changed files with 7 additions and 1 deletions
|
@ -5,7 +5,7 @@ if [ -z "$(uci -q get v2ray.main)" ]; then
|
|||
uci batch <<-EOF
|
||||
set v2ray.main=v2ray
|
||||
set v2ray.main.v2ray_file='/usr/bin/v2ray'
|
||||
set v2ray.main.mem_percentage='0'
|
||||
set v2ray.main.mem_percentage='80'
|
||||
set v2ray.main.loglevel='debug'
|
||||
set v2ray.main.access_log='/dev/null'
|
||||
set v2ray.main.error_log='/dev/null'
|
||||
|
@ -142,5 +142,11 @@ if [ "$(uci -q get v2ray.main.error_log)" != "/dev/null" ]; then
|
|||
commit v2ray
|
||||
EOF
|
||||
fi
|
||||
if [ "$(uci -q get v2ray.main.mem_percentage)" = "0" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set v2ray.main.mem_percentage='80'
|
||||
commit v2ray
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue