Skip to content

Commit 9325071

Browse files
Sync ct/ and install/ from ProxmoxVE
Mirrored automatically. The bootstrap line is rewritten to load the engine from core, which is the only difference to upstream.
1 parent 619257d commit 9325071

2 files changed

Lines changed: 124 additions & 0 deletions

File tree

ct/pyload.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env bash
2+
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/Incus/main"
3+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
4+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
5+
# Copyright (c) 2021-2026 community-scripts ORG
6+
# Author: MickLesk (CanbiZ)
7+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
8+
# Source: https://github.com/pyload/pyload
9+
10+
APP="pyLoad"
11+
var_tags="${var_tags:-downloader}"
12+
var_cpu="${var_cpu:-2}"
13+
var_ram="${var_ram:-2048}"
14+
var_disk="${var_disk:-16}"
15+
var_os="${var_os:-debian}"
16+
var_version="${var_version:-13}"
17+
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
18+
var_unprivileged="${var_unprivileged:-1}"
19+
20+
header_info "$APP"
21+
variables
22+
color
23+
catch_errors
24+
25+
function update_script() {
26+
header_info
27+
check_container_storage
28+
check_container_resources
29+
30+
if [[ ! -d /opt/pyload ]]; then
31+
msg_error "No ${APP} Installation Found!"
32+
exit
33+
fi
34+
35+
msg_info "Stopping Service"
36+
systemctl stop pyload
37+
msg_ok "Stopped Service"
38+
39+
msg_info "Updating ${APP}"
40+
$STD uv pip install --python /opt/pyload/.venv --upgrade --prerelease allow "pyload-ng[all]"
41+
msg_ok "Updated ${APP}"
42+
43+
msg_info "Starting Service"
44+
systemctl start pyload
45+
msg_ok "Started Service"
46+
msg_ok "Updated successfully!"
47+
exit
48+
}
49+
50+
start
51+
build_container
52+
description
53+
54+
msg_ok "Completed Successfully!\n"
55+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
56+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
57+
echo -e "${GATEWAY}${BGN}http://${IP}:8000${CL}"

install/pyload-install.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/pyload/pyload
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt install -y \
18+
unrar-free \
19+
p7zip-full \
20+
tesseract-ocr
21+
msg_ok "Installed Dependencies"
22+
23+
UV_PYTHON="3.13" setup_uv
24+
25+
msg_info "Setting up pyLoad"
26+
mkdir -p /opt/pyload_data/{userdir,downloads}
27+
$STD uv venv --python 3.13 /opt/pyload/.venv
28+
$STD uv pip install --python /opt/pyload/.venv --prerelease allow "pyload-ng[all]"
29+
msg_ok "Set up pyLoad"
30+
31+
msg_info "Creating Service"
32+
cat <<EOF >/etc/systemd/system/pyload.service
33+
[Unit]
34+
Description=pyLoad Download Manager
35+
Wants=network-online.target
36+
After=network-online.target
37+
38+
[Service]
39+
Type=simple
40+
User=root
41+
WorkingDirectory=/opt/pyload
42+
ExecStart=/opt/pyload/.venv/bin/pyload --userdir /opt/pyload_data/userdir --storagedir /opt/pyload_data/downloads
43+
Restart=always
44+
RestartSec=5
45+
46+
[Install]
47+
WantedBy=multi-user.target
48+
EOF
49+
systemctl enable -q --now pyload
50+
msg_ok "Created Service"
51+
52+
msg_info "Configuring Web Interface"
53+
for _ in {1..30}; do
54+
[[ -f /opt/pyload_data/userdir/settings/pyload.cfg ]] && break
55+
sleep 1
56+
done
57+
sed -i 's|^\([[:space:]]*ip host : "IP address"\) = localhost$|\1 = 0.0.0.0|' /opt/pyload_data/userdir/settings/pyload.cfg
58+
59+
# pyLoad rewrites storage_folder from --storagedir on every start; the first start seeded it.
60+
sed -i 's| --storagedir /opt/pyload_data/downloads||' /etc/systemd/system/pyload.service
61+
systemctl daemon-reload
62+
systemctl restart pyload
63+
msg_ok "Configured Web Interface"
64+
65+
motd_ssh
66+
customize
67+
cleanup_lxc

0 commit comments

Comments
 (0)