#!/bin/bash export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) if [ $? -ne 0 ]; then echo "Download public.sh failed, please check the network or try again later." exit 1 fi detect_arch() { case "${ARCH}" in x86_64) echo "amd64" ;; arm64 | aarch64) echo "arm64" ;; *) echo "unknown" ;; esac } run() { local arch=$(detect_arch) if [ "${arch}" == "unknown" ]; then error "Unsupported architecture: ${ARCH}" fi TARGET="acepanel-helper-${arch}" BIN_NAME="acepanel-helper" dl "$(pwd)" "/${TARGET}" mv "${TARGET}" "${BIN_NAME}" chmod +x "$BIN_NAME" if [ ! -t 0 ]; then exec