backup docker script
docker compose backup serverhost
This commit is contained in:
1 parent
3c69b2c915
commit
72fe77f040
6 files changed
+301
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#!/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
|
||||
Reference in new issue
Block a user