gluon-status-page-api: limit uhttp max_requests to 16 on devices with <48MB RAM (#1045)

This commit is contained in:
Christof Schulze 2017-02-24 19:38:40 +01:00 committed by Matthias Schiffer
parent 568ba483bb
commit 946d873c14
1 changed files with 7 additions and 2 deletions

View File

@ -8,6 +8,11 @@ uci -q batch <<-EOF
delete uhttpd.main.listen_https
set uhttpd.main.home=/lib/gluon/status-page/www
set uhttpd.main.max_requests=32
EOF
RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
if [ $RAM -lt $((48*1024)) ]; then
uci set uhttpd.main.max_requests=16
else
uci set uhttpd.main.max_requests=32
fi