From 5d9795139ea007cac8b7188dc5425ac263a73226 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 15:28:02 +0200 Subject: [PATCH] 'Add new script' (#4277) Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> --- ct/alpine-transmission.sh | 45 ++++++++++++++ frontend/public/json/transmission.json | 84 ++++++++++++++++---------- install/alpine-transmission-install.sh | 32 ++++++++++ 3 files changed, 129 insertions(+), 32 deletions(-) create mode 100644 ct/alpine-transmission.sh create mode 100644 install/alpine-transmission-install.sh diff --git a/ct/alpine-transmission.sh b/ct/alpine-transmission.sh new file mode 100644 index 000000000..75de34283 --- /dev/null +++ b/ct/alpine-transmission.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://transmissionbt.com/ + +APP="Alpine-Transmission" +var_tags="${var_tags:-alpine;torrent}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + msg_info "Updating Alpine Packages" + $STD apk -U upgrade + msg_ok "Updated Alpine Packages" + + msg_info "Updating Transmission" + $STD apk upgrade transmission-daemon + msg_ok "Updated Transmission" + + msg_info "Restarting Transmission" + $STD rc-service transmission-daemon restart + msg_ok "Restarted Transmission" + + exit 1 +} + +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 "${TAB}${GATEWAY}${BGN}http://${IP}:9091${CL}" diff --git a/frontend/public/json/transmission.json b/frontend/public/json/transmission.json index a73588759..44e2a99fe 100644 --- a/frontend/public/json/transmission.json +++ b/frontend/public/json/transmission.json @@ -1,35 +1,55 @@ { - "name": "Transmission", - "slug": "transmission", - "categories": [ - 11 - ], - "date_created": "2024-05-02", - "type": "ct", - "updateable": false, - "privileged": false, - "interface_port": 9091, - "documentation": null, - "website": "https://transmissionbt.com/", - "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/transmission.svg", - "config_path": "/etc/transmission-daemon/settings.json", - "description": "Transmission is a free, open-source BitTorrent client known for its fast download speeds and ease of use. It supports various platforms such as Windows, Linux, and macOS and has features like web interface, peer exchange, and encrypted transfers.", - "install_methods": [ - { - "type": "default", - "script": "ct/transmission.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 8, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "transmission", - "password": "transmission" + "name": "Transmission", + "slug": "transmission", + "categories": [ + 11 + ], + "date_created": "2025-05-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9091, + "documentation": "https://github.com/transmission/transmission/blob/main/docs/README.md", + "website": "https://transmissionbt.com/", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/transmission.svg", + "config_path": "Debian `/etc/transmission-daemon/settings.json` | Alpine `/var/lib/transmission/config/settings.json`", + "description": "Transmission is a free, open-source BitTorrent client known for its fast download speeds and ease of use. It supports various platforms such as Windows, Linux, and macOS and has features like web interface, peer exchange, and encrypted transfers.", + "install_methods": [ + { + "type": "default", + "script": "ct/transmission.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "debian", + "version": "12" + } }, - "notes": [] + { + "type": "alpine", + "script": "ct/alpine-transmission.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 1, + "os": "alpine", + "version": "3.21" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "type": "info", + "text": "Script disables whitelisting by default. Change config to suit your needs." + }, + { + "type": "info", + "text": "Alpine script sets initial disk size to 1GB. Please adjust for your needs after installation ends." + } + ] } diff --git a/install/alpine-transmission-install.sh b/install/alpine-transmission-install.sh new file mode 100644 index 000000000..d1f55f48a --- /dev/null +++ b/install/alpine-transmission-install.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://transmissionbt.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Transmission" +$STD apk add --no-cache transmission-cli transmission-daemon +$STD rc-service transmission-daemon start +$STD rc-service transmission-daemon stop +sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rpc-host-whitelist-enabled": true,/"rpc-host-whitelist-enabled": false,/g}' /var/lib/transmission/config/settings.json +msg_ok "Installed Transmission" + +msg_info "Enabling Transmission Service" +$STD rc-update add transmission-daemon default +msg_ok "Enabled Transmission Service" + +msg_info "Starting Transmission" +$STD rc-service transmission-daemon start +msg_ok "Started Transmission" + +motd_ssh +customize