fix push notification precendence race condition
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Moritz 2024-03-08 15:42:00 +01:00
parent dc66c02e23
commit 7865907811
1 changed files with 6 additions and 7 deletions

View File

@ -19,18 +19,17 @@ then
push_start_notification="curl -s '$PUSH_URL_START' &&"
fi
if [ -n "$PUSH_URL_SUCCESS" ]
then
push_success_notification=" && grep -q 'backup finished' /tmp/backup.log && curl -s '$PUSH_URL_SUCCESS'"
fi
if [ -n "$PUSH_URL_FAIL" ]
then
push_fail_notification="|| curl -s '$PUSH_URL_FAIL'"
fi
echo "$cron_schedule $push_start_notification backup --machine-logs create 2>&1 | tee /tmp/backup.log $push_success_notification $push_fail_notification" | crontab -
if [ -n "$PUSH_URL_SUCCESS" ]
then
push_notification=" && (grep -q 'backup finished' /tmp/backup.log && curl -s '$PUSH_URL_SUCCESS' $push_fail_notification)"
fi
echo "$cron_schedule $push_start_notification backup --machine-logs create 2>&1 | tee /tmp/backup.log $push_notification" | crontab -
crontab -l
crond -f -d8 -L /dev/stdout