vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
17.54k stars 3.18k forks source link

[Feature] x86保留配置安装固件后,OpenClash不会自动启动 #2899

Closed 281677160 closed 1 year ago

281677160 commented 1 year ago

Verify Steps

Describe the Feature

x86_64保留配置安装固件后,OpenClash不会自动启动

Describe the Solution

能不能在master跟dev分支的luci-app-openclash/root/etc/uci-defaults/luci-openclash文件的第183跟184行的命令加个判断

uci -q set openclash.config.enable=0
uci -q commit openclash

改成

if [[ "$(uci get openclash.config.enable)" == "0" ]] || [[ -z "$(uci get openclash.config.enable)" ]]; then
  uci -q set openclash.config.enable=0
  uci -q commit openclash
fi

有这个判断,就不会出现保留配置安装固件时,OpenClash不会自动启动的问题了,其他机型不了解,x86_64的,测试了一天是没问题的

Describe Alternatives

.........

Additional Context

..........

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days