kiddin9 il y a 3 ans
Parent
commit
0d9d07295a

+ 1 - 1
devices/common/default-settings

@@ -42,7 +42,7 @@ grep -q op.supes.top /etc/bypass/white.list ||
 
 processor=`cat /proc/cpuinfo | grep 'processor' | wc -l`
 test -n "$processor" || processor=3
-sed -i "s/^threads =.*/threads = $processor/" /etc/uwsgi/vassals/luci-webui.ini
+sed -i "/^threads =/c\threads = $processor" /etc/uwsgi/vassals/luci-webui.ini
 test $version -lt 1 && {
 	uci -q set luci.main.lang='auto'
 	uci -q set luci.main.mediaurlbase=/luci-static/edge

+ 1 - 1
devices/common/diy.sh

@@ -41,7 +41,7 @@ sed -i 's?admin/status/channel_analysis??' package/feeds/luci/luci-mod-status/ro
 sed -i "s/askfirst/respawn/g" `find package target -name inittab`
 date=`date +%m.%d.%Y`
 sed -i "/DISTRIB_DESCRIPTION/c\DISTRIB_DESCRIPTION=\"%D %C by Kiddin'\"" package/base-files/files/etc/openwrt_release
-sed -i "/CONFIG_VERSION_CODE=/c\CONFIG_VERSION_CODE=\"\$date\"" devices/common/.config
+sed -i "/CONFIG_VERSION_CODE=/c\CONFIG_VERSION_CODE=\"$date\"" devices/common/.config
 sed -i '$a cgi-timeout = 300' package/feeds/packages/uwsgi/files-luci-support/luci-webui.ini
 sed -i '/limit-as/c\limit-as = 5000' package/feeds/packages/uwsgi/files-luci-support/luci-webui.ini
 

+ 1 - 1
devices/common/patches/nginx_luci.patch

@@ -28,7 +28,7 @@
 +$lanaddr op" >/tmp/hosts/shortcuts
 +if [ -f /etc/nginx/conf.d/shortcuts.conf ]; then
 +if [[ "$lanaddr" != "`grep "set \$ip" /etc/nginx/conf.d/shortcuts.conf | head -n1 | cut -f 3 -d " " | sed -e 's/;//'`" ]]; then
-+	sed -i "/set $ip/c\set $ip \$lanaddr;" /etc/nginx/conf.d/shortcuts.conf
++	sed -i "/set \$ip/c\set \$ip $lanaddr;" /etc/nginx/conf.d/shortcuts.conf
 +	/etc/init.d/nginx reload
 +fi
 +cat /etc/nginx/conf.d/shortcuts.conf | tr "\n" "\r" |grep -oE 'server_name [a-z.-]*;[^;]*set \$ip [0-9.]*;' | sed -e 's/server_name \(.*\);.*location.*set $ip \(.*\);/\2 \1/' >>/tmp/hosts/shortcuts