Skip to content

Commit

Permalink
feat: 校验面板安装包
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 23, 2023
1 parent 342b804 commit 76dde17
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/install_panel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ Init_Panel() {
checksumsFileName=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("checksums")) | .name')
fi
wget -T 20 -t 3 -O ${setup_Path}/panel/${checksumsFileName} "${checksumsFile}"

# 处理 checksums 文件
if [ "${ARCH}" == "x86_64" ]; then
sed -i '/linux_arm64/d' ${setup_Path}/panel/${checksumsFileName}
elif [ "${ARCH}" == "aarch64" ]; then
sed -i '/linux_amd64/d' ${setup_Path}/panel/${checksumsFileName}
fi

cd ${setup_Path}/panel
if ! sha256sum --status -c ${checksumsFileName}; then
echo -e $HR
Expand Down

0 comments on commit 76dde17

Please sign in to comment.