diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65017650..70c814d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,10 @@ unit_test: extends: .go_cache allow_failure: true script: + - rm -rf /etc/apt/sources.list + - rm -rf /etc/apt/sources.list.d/* + - wget -O /etc/apt/sources.list https://mirrors.ustc.edu.cn/repogen/conf/debian-http-4-bookworm + - apt-get update - apt-get install -y curl jq - go test -v -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/README.md b/README.md index 28cfdcf7..cb623e63 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ CentOS Stream 可使用迁移脚本迁移至支持的系统: [CentOS 8/9 迁移 如果你决定继续,请以`root`用户登录服务器,执行以下命令安装面板: ```shell -bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/install_panel.sh) +HAOZI_DL_URL="https://jihulab.com/haozi-team/download/-/raw/main/panel"; curl -sSL -O ${HAOZI_DL_URL}/install_panel.sh && curl -sSL -O ${HAOZI_DL_URL}/install_panel.sh_checksums.txt && sha256sum -c install_panel.sh_checksums.txt && bash install_panel.sh || echo "Checksum 验证失败,文件可能被篡改,已终止操作" ``` ## 卸载面板 @@ -62,7 +62,7 @@ bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/instal 如果你无法重装系统,请以`root`用户登录服务器,执行以下命令卸载面板: ```shell -bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/uninstall_panel.sh) +HAOZI_DL_URL="https://jihulab.com/haozi-team/download/-/raw/main/panel"; curl -sSL -O ${HAOZI_DL_URL}/uninstall_panel.sh && curl -sSL -O ${HAOZI_DL_URL}/uninstall_panel.sh_checksums.txt && sha256sum -c uninstall_panel.sh_checksums.txt && bash uninstall_panel.sh || echo "Checksum 验证失败,文件可能被篡改,已终止操作" ``` 卸载面板前请务必备份好所有数据,提前卸载面板全部插件。卸载后数据将**无法恢复**! diff --git a/README_EN.md b/README_EN.md index 49915617..247e0876 100644 --- a/README_EN.md +++ b/README_EN.md @@ -48,7 +48,7 @@ Before installing the panel, you need to understand the basic knowledge of the L If you decide to continue, please log in to the server as `root` user and execute the following command to install the panel: ```shell -bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/install_panel.sh) +HAOZI_DL_URL="https://jihulab.com/haozi-team/download/-/raw/main/panel"; curl -sSL -O ${HAOZI_DL_URL}/install_panel.sh && curl -sSL -O ${HAOZI_DL_URL}/install_panel.sh_checksums.txt && sha256sum -c install_panel.sh_checksums.txt && bash install_panel.sh || echo "Checksum Verification Failed, File May Have Been Tampered With, Operation Terminated" ``` ## Uninstall Panel @@ -58,7 +58,7 @@ Recommended to back up data and reinstall the system first, so that the system c If you are unable to reinstall the system, log in to the server as the `root` user and execute the following command to uninstall the panel: ```shell -bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/uninstall_panel.sh) +HAOZI_DL_URL="https://jihulab.com/haozi-team/download/-/raw/main/panel"; curl -sSL -O ${HAOZI_DL_URL}/uninstall_panel.sh && curl -sSL -O ${HAOZI_DL_URL}/uninstall_panel.sh_checksums.txt && sha256sum -c uninstall_panel.sh_checksums.txt && bash uninstall_panel.sh || echo "Checksum Verification Failed, File May Have Been Tampered With, Operation Terminated" ``` Before uninstalling the panel, please be sure to back up all data and uninstall all panel plugins in advance. The data will **not be recoverable** after uninstallation! diff --git a/scripts/install_panel.sh b/scripts/install_panel.sh index 9ea5b2d4..305b70a5 100644 --- a/scripts/install_panel.sh +++ b/scripts/install_panel.sh @@ -283,6 +283,8 @@ EOF echo -e $HR panel init panel getInfo + rm -f install_panel.sh + rm -f install_panel.sh_checksums.txt } clear diff --git a/scripts/uninstall_panel.sh b/scripts/uninstall_panel.sh index 6942d6a0..bb244596 100644 --- a/scripts/uninstall_panel.sh +++ b/scripts/uninstall_panel.sh @@ -92,3 +92,6 @@ echo -e "${LOGO}" echo '耗子Linux面板卸载完成。' echo '感谢您的使用,欢迎您再次使用耗子Linux面板。' echo -e $HR + +rm -f uninstall_panel.sh +rm -f uninstall_panel.sh_checksums.txt