From 9ee021d6e6fac3951a442eed993d2173ebb74c8a Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 22:47:11 +0100 Subject: [PATCH] Gopeed (#18921) --- ct/gopeed.sh | 56 +++++++++++++++++++++++++++++++++++++ install/gopeed-install.sh | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 ct/gopeed.sh create mode 100644 install/gopeed-install.sh diff --git a/ct/gopeed.sh b/ct/gopeed.sh new file mode 100644 index 000000000..7defb0da8 --- /dev/null +++ b/ct/gopeed.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/GopeedLab/gopeed + +APP="Gopeed" +var_tags="${var_tags:-downloader;torrent}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-yes}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/gopeed ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "gopeed" "GopeedLab/gopeed"; then + msg_info "Stopping Gopeed" + systemctl stop gopeed + msg_ok "Stopped Gopeed" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gopeed" "GopeedLab/gopeed" "prebuild" "latest" "/opt/gopeed" "gopeed-web-v*-linux-$(arch_resolve "amd64" "arm64").zip" + + msg_info "Starting Gopeed" + systemctl start gopeed + msg_ok "Started Gopeed" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW}Access it using the following URL:${CL}" +echo -e "${GATEWAY}${BGN}http://${IP}:9999${CL}" diff --git a/install/gopeed-install.sh b/install/gopeed-install.sh new file mode 100644 index 000000000..acff155e9 --- /dev/null +++ b/install/gopeed-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/GopeedLab/gopeed + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +fetch_and_deploy_gh_release "gopeed" "GopeedLab/gopeed" "prebuild" "latest" "/opt/gopeed" "gopeed-web-v*-linux-$(arch_resolve "amd64" "arm64").zip" + +msg_info "Configuring Gopeed" +mkdir -p /opt/gopeed_data/{storage,downloads} +cat </opt/gopeed_data/config.json +{ + "address": "0.0.0.0", + "port": 9999, + "username": "gopeed", + "password": "$(random_password)", + "apiToken": "$(openssl rand -hex 32)", + "storageDir": "/opt/gopeed_data/storage", + "downloadConfig": { + "downloadDir": "/opt/gopeed_data/downloads" + } +} +EOF +chmod 600 /opt/gopeed_data/config.json +msg_ok "Configured Gopeed" + +msg_info "Creating Gopeed Service" +cat </etc/systemd/system/gopeed.service +[Unit] +Description=Gopeed +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/gopeed +ExecStart=/opt/gopeed/gopeed -c /opt/gopeed_data/config.json +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now gopeed +msg_ok "Created Gopeed Service" + +motd_ssh +customize +cleanup_lxc