mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
add option to enable daily backups
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
936b4ebb0f
commit
bcf36406a8
19 changed files with 314 additions and 16 deletions
26
Containers/mastercontainer/backup-time-file-watcher.sh
Normal file
26
Containers/mastercontainer/backup-time-file-watcher.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
restart_process() {
|
||||
set -x
|
||||
pkill cron.sh
|
||||
set +x
|
||||
}
|
||||
|
||||
file_present() {
|
||||
if [ -f "/mnt/docker-aio-config/data/daily_backup_time" ]; then
|
||||
if [ "$FILE_PRESENT" = 0 ]; then
|
||||
restart_process
|
||||
fi
|
||||
FILE_PRESENT=1
|
||||
else
|
||||
if [ "$FILE_PRESENT" = 1 ]; then
|
||||
restart_process
|
||||
fi
|
||||
FILE_PRESENT=0
|
||||
fi
|
||||
}
|
||||
|
||||
while true; do
|
||||
file_present
|
||||
sleep 5
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue