#!/bin/bash
#
# Check Backup script
#
# Copyright Daniel Mehrmann (c) 2024
# Created 30.12.24
#

### check conditions
if [ -f /.backup_run ]; then
   echo "Lockfile from previous backup found!..."
   while true; do
     echo -e '\a' > /dev/console
     sleep 5
     if [ -f /.backup_exit ]; then
        rm  /.backup_exit
        exit 255
     fi
   done
   exit 255
fi

exit 0
