2023-03-22 20:48:20 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-01-01 12:13:05 -05:00
|
|
|
# Copyright (c) 2021-2024 tteck
|
2023-03-22 20:48:20 -04:00
|
|
|
# Author: tteck (tteckster)
|
|
|
|
# License: MIT
|
|
|
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
|
|
|
|
|
|
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
|
|
|
|
$STD apt-get install -y sudo
|
|
|
|
$STD apt-get install -y mc
|
2023-10-28 06:54:37 -04:00
|
|
|
$STD apt-get install -y python3-libtorrent
|
2023-03-22 20:48:20 -04:00
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
2023-06-21 10:43:49 -04:00
|
|
|
msg_info "Updating Python3"
|
|
|
|
$STD apt-get install -y \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip
|
|
|
|
msg_ok "Updated Python3"
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
|
|
msg_info "Installing Deluge"
|
|
|
|
$STD pip install deluge[all]
|
|
|
|
msg_ok "Installed Deluge"
|
|
|
|
|
|
|
|
msg_info "Creating Service"
|
|
|
|
service_path="/etc/systemd/system/deluged.service"
|
|
|
|
echo "[Unit]
|
|
|
|
Description=Deluge Bittorrent Client Daemon
|
|
|
|
Documentation=man:deluged
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
UMask=007
|
|
|
|
ExecStart=/usr/local/bin/deluged -d
|
|
|
|
Restart=on-failure
|
|
|
|
TimeoutStopSec=300
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target" >$service_path
|
|
|
|
|
|
|
|
service_path="/etc/systemd/system/deluge-web.service"
|
|
|
|
echo "[Unit]
|
|
|
|
Description=Deluge Bittorrent Client Web Interface
|
|
|
|
Documentation=man:deluge-web
|
|
|
|
After=deluged.service
|
|
|
|
Wants=deluged.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
UMask=027
|
|
|
|
ExecStart=/usr/local/bin/deluge-web -d
|
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target" >$service_path
|
|
|
|
systemctl enable --now -q deluged.service
|
|
|
|
systemctl enable --now -q deluge-web.service
|
|
|
|
msg_ok "Created Service"
|
|
|
|
|
|
|
|
motd_ssh
|
2023-05-15 07:39:30 -04:00
|
|
|
customize
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
|
|
msg_info "Cleaning up"
|
|
|
|
$STD apt-get autoremove
|
|
|
|
$STD apt-get autoclean
|
|
|
|
msg_ok "Cleaned"
|