x86_64-alpine-db-sidecar/start.sh
Jonathan Ervine dec3796493 modified: .gitignore
new file:   Dockerfile
	new file:   Jenkinsfile
	new file:   LICENSE
	new file:   README.md
	new file:   start.sh
2020-07-09 22:36:17 +08:00

20 lines
629 B
Bash

#!/bin/sh
##
## Script to automate the copy of Sonarr databases
##
echo -e 'Starting the sidecar container to periodically backup the sonarr databases'
chown 1003:1003 /mnt/app-local-config
chown 1003:1003 /app-remote-config/*
echo -e 'Copy the config from the remote share to the ramdisk'
cp -fvp /app-remote-config/*.* /mnt/app-local-config
echo -e 'Set up the filesystem freeze, copy, unfreeze loop'
while true; do
sleep 890
date
sync /mnt/app-local-config/*.*
fsfreeze --freeze /mnt/app-local-config
sleep 10
cp -fvp /mnt/app-local-config/*.* /app-remote-config/
fsfreeze --unfreeze /mnt/app-local-config
done