mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Add check in daily-backup.sh for uninitialized state
Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
This commit is contained in:
parent
a9de130a2c
commit
00b2465379
1 changed files with 7 additions and 0 deletions
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
echo "Daily backup script has started"
|
||||
|
||||
# Check if initial configuration has been done, otherwise this script should do nothing.
|
||||
configFile=/mnt/docker-aio-config/data/configuration.json
|
||||
if [ ! -f "$configFile" ] || ! grep -q -E '"wasStartButtonClicked"\s*:\s*1\s*,' "$configFile"; then
|
||||
echo "Initial configuration not done yet. Exiting..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Daily backup and backup check cannot be run at the same time
|
||||
if [ "$DAILY_BACKUP" = 1 ] && [ "$CHECK_BACKUP" = 1 ]; then
|
||||
echo "Daily backup and backup check cannot be run at the same time. Exiting..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue