2023-03-22 20:48:20 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 tteck
|
2023-03-22 20:48:20 -04:00
|
|
|
# Author: tteck (tteckster)
|
2025-03-04 17:54:20 +01:00
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
|
# Source: https://www.deluge-torrent.org/
|
2023-03-22 20:48:20 -04:00
|
|
|
|
2025-03-24 14:20:56 +01:00
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
2023-03-22 20:48:20 -04:00
|
|
|
color
|
|
|
|
|
verb_ip6
|
|
|
|
|
catch_errors
|
|
|
|
|
setting_up_container
|
|
|
|
|
network_check
|
|
|
|
|
update_os
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Dependencies"
|
2026-01-23 21:54:23 +01:00
|
|
|
$STD apt install -y \
|
|
|
|
|
python3-pip \
|
|
|
|
|
python3-libtorrent
|
2023-03-22 20:48:20 -04:00
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Deluge"
|
2026-01-23 21:54:23 +01:00
|
|
|
mkdir -p ~/.config/pip
|
|
|
|
|
cat >~/.config/pip/pip.conf <<EOF
|
|
|
|
|
[global]
|
|
|
|
|
break-system-packages = true
|
|
|
|
|
EOF
|
2023-03-22 20:48:20 -04:00
|
|
|
$STD pip install deluge[all]
|
|
|
|
|
msg_ok "Installed Deluge"
|
|
|
|
|
|
|
|
|
|
msg_info "Creating Service"
|
2026-01-23 21:54:23 +01:00
|
|
|
cat <<EOF >/etc/systemd/system/deluged.service
|
|
|
|
|
[Unit]
|
2023-03-22 20:48:20 -04:00
|
|
|
Description=Deluge Bittorrent Client Daemon
|
|
|
|
|
Documentation=man:deluged
|
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
UMask=007
|
2026-01-23 21:54:23 +01:00
|
|
|
ExecStart=/usr/bin/deluged -d
|
2023-03-22 20:48:20 -04:00
|
|
|
Restart=on-failure
|
|
|
|
|
TimeoutStopSec=300
|
|
|
|
|
|
|
|
|
|
[Install]
|
2026-01-23 21:54:23 +01:00
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOF
|
2023-03-22 20:48:20 -04:00
|
|
|
|
2026-01-23 21:54:23 +01:00
|
|
|
cat <<EOF >/etc/systemd/system/deluge-web.service
|
|
|
|
|
[Unit]
|
2023-03-22 20:48:20 -04:00
|
|
|
Description=Deluge Bittorrent Client Web Interface
|
|
|
|
|
Documentation=man:deluge-web
|
|
|
|
|
After=deluged.service
|
|
|
|
|
Wants=deluged.service
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
UMask=027
|
2026-01-23 21:54:23 +01:00
|
|
|
ExecStart=/usr/bin/deluge-web -d
|
2023-03-22 20:48:20 -04:00
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
|
|
[Install]
|
2026-01-23 21:54:23 +01:00
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOF
|
|
|
|
|
systemctl enable --now -q deluged.service deluge-web.service
|
2023-03-22 20:48:20 -04:00
|
|
|
msg_ok "Created Service"
|
|
|
|
|
|
|
|
|
|
motd_ssh
|
2023-05-15 07:39:30 -04:00
|
|
|
customize
|
2025-11-22 17:27:13 +01:00
|
|
|
cleanup_lxc
|