1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2021-04-06 08:01:38 +02:00
parent 9a120ae502
commit 5881c303f4

View file

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