From e5e263d37f25b1d353494038ac038645bfc578a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= Date: Sun, 23 Mar 2025 19:55:36 +0100 Subject: [PATCH] Update qBittorrent --- ct/qbittorrent.sh | 2 +- install/qbittorrent-install.sh | 63 ++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 install/qbittorrent-install.sh diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 9dcbc02..0e10c11 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -43,7 +43,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" rm -f /opt/qbittorrent/qbittorrent-nox - wget -q "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox -O /opt/qbittorrent/qbittorrent-nox" + wget -q "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -O /opt/qbittorrent/qbittorrent-nox chmod +x /opt/qbittorrent/qbittorrent-nox echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh new file mode 100644 index 0000000..7dd7df1 --- /dev/null +++ b/install/qbittorrent-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.qbittorrent.org/ + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup qBittorrent-nox" +FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +RELEASE=$(echo $RELEASE | cut -c 9-13) +mkdir -p /opt/qbittorrent +wget -q "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox -O /opt/qbittorrent/qbittorrent-nox" +chmod +x /opt/qbittorrent/qbittorrent-nox +mkdir -p $HOME/.config/qBittorrent/ +cat <$HOME/.config/qBittorrent/qBittorrent.conf +[LegalNotice] +Accepted=true + +[Preferences] +WebUI\Password_PBKDF2="@ByteArray(amjeuVrF3xRbgzqWQmes5A==:XK3/Ra9jUmqUc4RwzCtrhrkQIcYczBl90DJw2rT8DFVTss4nxpoRhvyxhCf87ahVE3SzD8K9lyPdpyUCfmVsUg==)" +WebUI\Port=8090 +WebUI\UseUPnP=false +WebUI\Username=admin +EOF +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup qBittorrent-nox" + +msg_info "Creating Service" +cat </etc/systemd/system/qbittorrent-nox.service +[Unit] +Description=qBittorrent client +After=network.target +[Service] +ExecStart=/opt/qbittorrent/qbittorrent-nox +Restart=always +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now qbittorrent-nox +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"