Skip to content

Commit

Permalink
try fix high resource usage
Browse files Browse the repository at this point in the history
  • Loading branch information
heinu123 committed Apr 14, 2024
1 parent 7f1b611 commit 761bbf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions module/clash/clash.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ disable_ipv6="false"
auto_config="false"
# 开启配置自动替换

sleeptime="10"
# 监听packages.list的间隔时间

auto_updateSubcript="true"
# 是否开启自动更新订阅

Expand Down
11 changes: 5 additions & 6 deletions module/clash/scripts/clash.tool
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,11 @@ port_detection() {
update_pre() {
flag=false
if [ $Geo_auto_update != "true" ];then
if [ ${auto_updateGeoIP} == "true" ] && [ ${auto_updateGeoSite} == "true" ]; then
if [ -f "${Clash_pid_file}" ];then
curl -X POST -d '{"path": "", "payload": ""}' http://127.0.0.1:${Clash_ui_port}/configs/geo
fi
if [ ${auto_updateGeoIP} == "true" ];then
update_file ${GeoIP_url} ${Clash_GeoIP_file}
fi
if [ ${auto_updateGeoSite} == "true" ]; then
update_file ${GeoSite_url} ${Clash_GeoSite_file}
fi
fi
if [ ${auto_updateclashMeta} == "true" ]; then
Expand All @@ -296,8 +297,6 @@ update_pre() {
if [ -f "${Clash_pid_file}" ] && [ ${flag} == true ]; then
if [ "${restart_update}" == "true" ];then
restart_clash
else
reload
fi
fi

Expand Down

0 comments on commit 761bbf3

Please sign in to comment.