Skip to content

Commit df073df

Browse files
committed
fix(service): 修复启动停止的问题,为修改 proxy-providers 添加 "auto_modify_config"="true" 的限制
1 parent dfc467d commit df073df

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

box/scripts/box.tool

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,15 @@ upsubs() {
585585
log Info "成功更新 ${success_count} / ${url_count} 个订阅"
586586

587587
if [ "${renew}" != "true" ] && [ "${success_count}" -gt 0 ]; then
588-
log Info "正在更新 ${name_mihomo_config} 的 proxy-providers 配置..."
589-
if update_mihomo_providers; then
590-
log Info "proxy-providers 配置更新成功"
588+
if [ "${auto_modify_config}" = "true" ]; then
589+
log Info "正在更新 ${name_mihomo_config} 的 proxy-providers 配置..."
590+
if update_mihomo_providers; then
591+
log Info "proxy-providers 配置更新成功"
592+
else
593+
log Warning "proxy-providers 配置更新失败,请手动检查配置文件"
594+
fi
591595
else
592-
log Warning "proxy-providers 配置更新失败,请手动检查配置文件"
596+
log Info "auto_modify_config 未启用,跳过更新 proxy-providers 配置"
593597
fi
594598
fi
595599

box/settings.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ log() {
205205
echo "${message}" | tee -a "${box_log}"
206206
fi
207207

208-
[[ $TOAST ]] && true
208+
if [[ $TOAST ]]; then
209+
true
210+
fi
209211
}
210212

0 commit comments

Comments
 (0)