mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Set uhttpd config only at first boot and update fstab at update
This commit is contained in:
parent
5bcc428e64
commit
de776701e8
2 changed files with 10 additions and 6 deletions
|
@ -1,8 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
uci -q batch <<-EOF >/dev/null
|
if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
set uhttpd.main.redirect_https=0
|
set uhttpd.main.redirect_https=0
|
||||||
set uhttpd.main.script_timeout=240
|
set uhttpd.main.script_timeout=240
|
||||||
set uhttpd.main.network_timeout=240
|
set uhttpd.main.network_timeout=240
|
||||||
set uhttpd.main.http_keepalive=0
|
set uhttpd.main.http_keepalive=0
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
|
@ -12,6 +12,8 @@ uci -q batch <<-EOF >/dev/null
|
||||||
commit fstab
|
commit fstab
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
/sbin/block detect > /etc/config/fstab
|
||||||
|
|
||||||
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ "$(uci -q get openmptcprouter.settings.scaling_governor)" != "performance" ] && {
|
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ "$(uci -q get openmptcprouter.settings.scaling_governor)" != "performance" ] && {
|
||||||
# force CPU speed for RPI
|
# force CPU speed for RPI
|
||||||
uci -q set openmptcprouter.settings.scaling_min_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
uci -q set openmptcprouter.settings.scaling_min_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue