mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-09-09 16:14:54 +08:00
Merge pull request #6574 from apparle/improve-start-command
Make daily-backup.sh more robust by checking for uninitialized state
This commit is contained in:
commit
9351614972
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.
|
||||
CONFIG_FILE=/mnt/docker-aio-config/data/configuration.json
|
||||
if ! [ -f "$CONFIG_FILE" ] || ! grep -q "wasStartButtonClicked.*1" "$CONFIG_FILE"; then
|
||||
echo "Initial configuration via AIO interface 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
Reference in a new issue