From 56ccc04911f402f510a515150909cd0f107f6055 Mon Sep 17 00:00:00 2001 From: xiaov Date: Tue, 27 Aug 2024 20:58:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A3=80=E6=9F=A5=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clash/scripts/clash_control.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clash/scripts/clash_control.sh b/clash/scripts/clash_control.sh index 0a07206..33046a8 100755 --- a/clash/scripts/clash_control.sh +++ b/clash/scripts/clash_control.sh @@ -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() {