fixup! gluon-status-page-api: limit uhttp max_requests to 16 on devices with less than 48MB RAM (part 1/2 for fixing #1032)

This commit is contained in:
Christof Schulze 2017-02-24 16:31:45 +01:00
parent b3bc419578
commit fa6bb57f5d

View File

@ -10,12 +10,12 @@ uci -q batch <<-EOF
set uhttpd.main.home=/lib/gluon/status-page/www
EOF
RAM=$(grep MemTotal /proc/meminfo |awk '{print $2}')
RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
if [ $RAM -lt $((48*1024)) ]; then
echo "set uhttpd.main.max_requests=16"
uci set uhttpd.main.max_requests=16
else
echo "set uhttpd.main.max_requests=32"
fi |uci -q batch
uci set uhttpd.main.max_requests=32
fi
if [ -x /etc/init.d/rpcd ]; then
/etc/init.d/rpcd disable