Merge pull request #22 from powerAn2020/master

修复因面板文件夹不存在而导致的解压失败
This commit is contained in:
t@marin
2023-05-13 21:34:15 +07:00
committed by GitHub

View File

@@ -377,6 +377,10 @@ update_dashboard() {
if [[ "${bin_name}" == "sing-box" || "${bin_name}" == "clash" ]]; then
file_dashboard="${data_dir}/${bin_name}/dashboard.zip"
rm -rf "${data_dir}/${bin_name}/dashboard/dist"
if [ ! -d "${data_dir}/${bin_name}/dashboard" ];then
log info "dashboard folder not exist,create it"
mkdir "${data_dir}/${bin_name}/dashboard"
fi
url="https://github.com/CHIZI-0618/yacd/archive/gh-pages.zip"
dir_name="yacd-gh-pages"
busybox wget --no-check-certificate "${url}" -O "${file_dashboard}" >&2 || { log error "Failed to download ${url}"; exit 1; }
@@ -454,4 +458,4 @@ case "$1" in
echo "$0: usage: $0 {reload|testing|keepdns|connect|upyacd|upcore|cgroup|port|subgeo|all}"
exit 1
;;
esac
esac