aredn/files/etc/uci-defaults/95_lowmem_devices

12 lines
335 B
Bash
Executable File

#!/bin/sh
# Modify configuration for low memory devices
MEM=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
if [ $MEM -le 32768 ]; then
# Reduce parallel requests
/sbin/uci -c /etc/config.mesh -q set uhttpd.main.max_requests=1
/sbin/uci -c /etc/config.mesh -q commit uhttpd
# Disable wpad
/etc/init.d/wpad disable
fi