Skip to content

Commit

Permalink
fix: 修复配置文件检查报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaov committed Aug 27, 2024
1 parent a900205 commit 56ccc04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clash/scripts/clash_control.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ check_config_file() {
[[ "$clash_core_current" == "" ]] && dbus set clash_core_current="clash_for_arm64"
[[ "$clash_core_list" == "" ]] && list_clash_core

[[ "$clash_arch_type" == "" ]] && dbus set clash_arch_type=`get_arch`

# 编辑文件没指定或文件不存在则获取默认值 #
[[ "$clash_edit_filepath" == "" || ! -f "${CONFIG_HOME}/$clash_edit_filepath" ]] && dbus set clash_edit_filepath="$clash_config_filepath"
clash_yacd_secret=$(${YQ} e '.secret' $config_file)
clash_yacd_ui="http://${lan_ipaddr}:${yacd_port}/ui/yacd/?hostname=${lan_ipaddr}&port=${yacd_port}&secret=$clash_yacd_secret"
dbus set clash_yacd_ui=$clash_yacd_ui
[[ "$clash_arch_type" == "" ]] && dbus set clash_arch_type=`get_arch`
}

LOGGER() {
Expand Down

0 comments on commit 56ccc04

Please sign in to comment.