Files
Server-scripts/docker_compose/serverhost/qbittorrent/10-torrent-init.sh
T

32 lines
706 B
Bash
Raw Normal View History

2026-10-01 14:06:21 +00:00
#!/usr/bin/with-contenv bash
set -e
cp -f /hostscripts/torrent_mqtt.py /config/
cp -f /hostscripts/torrent_qbittorrent_complete.sh /config/
chmod +x /config/torrent_qbittorrent_complete.sh
2026-10-21 22:03:24 +02:00
if ! command -v scp >/dev/null 2>&1; then
echo "Install scp"
for i in {1..12}; do
if apk add --no-cache openssh-client; then
break
fi
echo "Retry $i/12"
sleep 5
done
fi
2026-10-01 14:06:21 +00:00
if [ ! -d /config/.venv ]; then
echo "Generate venv"
python3 -m venv /config/.venv
/config/.venv/bin/pip install --upgrade pip
/config/.venv/bin/pip install paho-mqtt
fi
chmod 700 /config/.ssh
chmod 600 /config/.ssh/id_ed25519
chmod 644 /config/.ssh/id_ed25519.pub