diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 9212099e..73b371a5 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -20,7 +20,7 @@ jobs: - name: Fetch Frontend run: | sudo apt-get install -y curl jq unzip zip - curl -L -s https://api.github.com/repos/haozi-team/panel-frontend/releases/latest | jq -r ".assets[] | select(.name | contains(\"dist\")) | .browser_download_url" | xargs curl -L -o frontend.zip + curl -sSL https://api.github.com/repos/haozi-team/panel-frontend/releases/latest | jq -r ".assets[] | select(.name | contains(\"dist\")) | .browser_download_url" | xargs curl -L -o frontend.zip rm -rf public unzip frontend.zip mv dist public diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e622eb5..65017650 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,7 @@ fetch: - sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories - apk add --no-cache curl jq unzip zip script: - - curl -L -s "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel-frontend/releases" | jq -r '.[0].assets.links[] | select(.name | contains("dist")) | .direct_asset_url' | xargs curl -L -o frontend.zip + - curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel-frontend/releases" | jq -r '.[0].assets.links[] | select(.name | contains("dist")) | .direct_asset_url' | xargs curl -L -o frontend.zip - rm -rf public - unzip frontend.zip - mv dist public diff --git a/README.md b/README.md index f55099e7..28cfdcf7 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ CentOS Stream 可使用迁移脚本迁移至支持的系统: [CentOS 8/9 迁移 如果你决定继续,请以`root`用户登录服务器,执行以下命令安装面板: ```shell -bash <(curl -L -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/install_panel.sh) +bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/install_panel.sh) ``` ## 卸载面板 @@ -62,7 +62,7 @@ bash <(curl -L -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/ins 如果你无法重装系统,请以`root`用户登录服务器,执行以下命令卸载面板: ```shell -bash <(curl -L -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/uninstall_panel.sh) +bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/uninstall_panel.sh) ``` 卸载面板前请务必备份好所有数据,提前卸载面板全部插件。卸载后数据将**无法恢复**! diff --git a/README_EN.md b/README_EN.md index 148423d6..49915617 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 -L -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/install_panel.sh) +bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/install_panel.sh) ``` ## 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 -L -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/uninstall_panel.sh) +bash <(curl -sSL https://jihulab.com/haozi-team/download/-/raw/main/panel/uninstall_panel.sh) ``` 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/pkg/tools/tools.go b/pkg/tools/tools.go index 7977ca2d..9fa6bc00 100644 --- a/pkg/tools/tools.go +++ b/pkg/tools/tools.go @@ -97,9 +97,9 @@ func GetLatestPanelVersion() (PanelInfo, error) { isChina := IsChina() if isChina { - output = Exec(`curl -L -s "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest"`) + output = Exec(`curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest"`) } else { - output = Exec(`curl -L -s "https://api.github.com/repos/haozi-team/panel/releases/latest"`) + output = Exec(`curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest"`) } if len(output) == 0 { @@ -160,9 +160,9 @@ func GetPanelVersion(version string) (PanelInfo, error) { isChina := IsChina() if isChina { - output = Exec(`curl -L -s "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases/"` + version + `"`) + output = Exec(`curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases/"` + version + `"`) } else { - output = Exec(`curl -L -s "https://api.github.com/repos/haozi-team/panel/releases/tags/` + version + `"`) + output = Exec(`curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/tags/` + version + `"`) } if len(output) == 0 { diff --git a/scripts/install_panel.sh b/scripts/install_panel.sh index 43c2acd3..9ea5b2d4 100644 --- a/scripts/install_panel.sh +++ b/scripts/install_panel.sh @@ -181,15 +181,15 @@ Init_Panel() { # 下载面板zip包并解压 if [ "${ARCH}" == "x86_64" ]; then if ${inChina}; then - panelZip=$(curl -L -s "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases" | jq -r '.[0].assets.links[] | select(.name | contains("amd64v2")) | .direct_asset_url') + panelZip=$(curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases" | jq -r '.[0].assets.links[] | select(.name | contains("amd64v2")) | .direct_asset_url') else - panelZip=$(curl -L -s "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("amd64v2")) | .browser_download_url') + panelZip=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("amd64v2")) | .browser_download_url') fi elif [ "${ARCH}" == "aarch64" ]; then if ${inChina}; then - panelZip=$(curl -L -s "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases" | jq -r '.[0].assets.links[] | select(.name | contains("arm64")) | .direct_asset_url') + panelZip=$(curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases" | jq -r '.[0].assets.links[] | select(.name | contains("arm64")) | .direct_asset_url') else - panelZip=$(curl -L -s "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("arm64")) | .browser_download_url') + panelZip=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("arm64")) | .browser_download_url') fi else echo -e $HR