We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
format -w -c
check -c
1 parent cce73c6 commit 334be91Copy full SHA for 334be91
1 file changed
box/scripts/box.service
@@ -213,8 +213,8 @@ prepare_singbox() {
213
# 确保日志路径是绝对路径
214
${yq} '.log.output = "'"${box_run}/${bin_name}.log"'"' -i --output-format=json "${sing_config}" 2>/dev/null || true
215
216
- # 格式化 sing-box 配置
217
- if ${bin_path} format -w -c "${sing_config}" > "${box_run}/${bin_name}.log" 2>&1; then
+ # 检查 sing-box 配置
+ if ${bin_path} check -c "${sing_config}" > "${box_run}/${bin_name}.log" 2>&1; then
218
# 根据 network_mode 设置 auto_route
219
if [[ "${network_mode}" == @(mixed|tun) ]]; then
220
# 检查配置中是否有 "type": "tun"
0 commit comments