This commit is contained in:
albert 2024-04-17 22:47:12 +09:00
parent 1655880ebb
commit 311ab87aed
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A

View file

@ -27,6 +27,9 @@ if [[ $mounted1 != 0 ]] || [[ $mounted2 != 0 ]] || [[ $mounted3 != 0 ]] ; then
fi
# If an old backup is still running, don't continue
echo "Checking run"
ps aux | grep $BACKUP_NAME | grep -v grep
if [[ `ps aux | grep $BACKUP_NAME | grep -v grep` ]] ; then
echo -e "$BACKUP_NAME rsync still running. Exiting...."
payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"