Skip to content

Commit

Permalink
Update luci_v2ray
Browse files Browse the repository at this point in the history
  • Loading branch information
local committed Oct 15, 2023
1 parent 7b03b8b commit a29e0df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/etc/init.d/luci_v2ray
Original file line number Diff line number Diff line change
Expand Up @@ -2605,8 +2605,8 @@ start_instance() {
if [ "$mem_percentage" -gt "0" ]; then
local mem_total="$(awk '/MemTotal/ {print $2}' /proc/meminfo)"
if [ -n "$mem_total" ]; then
local use_mem="$(expr $mem_total \* $mem_percentage \* 10)"
procd_append_param limits as="$use_mem $use_mem"
local use_mem_in_kib="$(expr $mem_total \* $mem_percentage \/ 100)"
procd_set_param env GOMEMLIMIT="${use_mem_in_kib}KiB"
fi
fi

Expand Down

0 comments on commit a29e0df

Please sign in to comment.