浏览代码

fix restart/reload when use luci-nginx

acooler15 4 年之前
父节点
当前提交
daefb49e24
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus

+ 5 - 0
luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus

@@ -28,5 +28,10 @@ if [ ! -s "/etc/config/shadowsocksr" ]; then
 fi
 sed -i "s/option type 'vmess'"/"option type 'v2ray'\n\toption v2ray_protocol 'vmess'/g" /etc/config/shadowsocksr
 sed -i "s/option type 'vless'"/"option type 'v2ray'\n\toption v2ray_protocol 'vless'/g" /etc/config/shadowsocksr
+if [ -s "/etc/uwsgi/vassals/luci-webui.ini" ];then
+	limit=$(cat /etc/uwsgi/vassals/luci-webui.ini  | grep -Eo "limit-as.*"|grep -Eo "[0-9]+")
+	[ $limit -lt 5000 ] && sed -i '/limit-as/c\limit-as = 5000' /etc/uwsgi/vassals/luci-webui.ini && \
+	/etc/init.d/uwsgi restart
+fi
 rm -rf /tmp/luci-modulecache /tmp/luci-indexcache
 exit 0