Files
pms/root/etc/cont-init.d/30-plex-cfg
2018-11-19 11:19:57 +01:00

16 lines
391 B
Plaintext
Executable File

#!/usr/bin/with-contenv bash
# Check, if a configuration directory exists
if [[ -d /config/Library ]]
then
echo "Configuration found, skipping restore of backup"
else
if rclone ls $BACKUP/pms.tar.gz
then
echo "No configuration found, restoring backup..."
rclone copy $BACKUP/pms.tar.gz / --verbose --transfers 4 --checkers 20 --stats 10s
cd /config
tar -xvzf /pms.tar.gz
fi
fi