We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
check -c
1 parent 334be91 commit e51de93Copy full SHA for e51de93
1 file changed
box/scripts/box.service
@@ -214,7 +214,7 @@ prepare_singbox() {
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} check -c "${sing_config}" > "${box_run}/${bin_name}.log" 2>&1; then
+ if ( cd "$(dirname "${sing_config}")" && "${bin_path}" check -c "$(basename "${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