😸

[Proxmox] pyloadのLXCコンテナ作る

2024/01/03に公開

Create CT

Ubuntu-22.04 standard のテンプレートから開始

# ユーザー追加
adduser --system pyload

# インストール
apt update
apt install -y python3 python-is-python3 python3-pip libcurl4-openssl-dev libssl-dev python3-pil python3-openssl libcurl4-openssl-dev libssl-dev p7zip ffmpeg tesseract-ocr
pip install --pre pyload-ng[all]

# クリーニング
apt-get clean autoclean
apt-get autoremove --yes
rm -rf /var/lib/{apt,dpkg,cache,log}/

# daemonの設定
cat <<EOF > /etc/systemd/system/pyload.service
[Unit]
Description=pyLoad Downloader
After=network-online.target nss-lookup.target local-fs.target remote-fs.target
[Service]
User=pyload
ExecStart=/usr/local/bin/pyload
[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable pyload.service
systemctl start pyload.service

# pyloadの設定
line=$(grep -n "ip host : \"IP address\" = localhost" /home/pyload/.pyload/settings/pyload.cfg | tail -1 | cut -d: -f1) && [ ! -z "$line" ] && sed -i "${line}s|ip host : \"IP address\" = localhost|ip host : \"IP address\" = 0.0.0.0|" /home/pyload/.pyload/settings/pyload.cfg

以上

Discussion