Files
Server-scripts/docker_compose/serverhost/qbittorrent/10-torrent-init.sh
T
lucas 72fe77f040 backup docker script
docker compose backup serverhost
2026-10-01 14:07:31 +00:00

33 lines
718 B
Bash
Executable File

#!/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
#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
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