Update backup scripts
This commit is contained in:
parent
bf584b10f4
commit
3d6a8dfdac
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ fi
|
||||||
# If an old backup is still running, don't continue
|
# If an old backup is still running, don't continue
|
||||||
if [[ `ps aux | grep rsync | grep -v grep | grep -v $BACKUP_NAME` ]] ; then
|
if [[ `ps aux | grep rsync | grep -v grep | grep -v $BACKUP_NAME` ]] ; then
|
||||||
echo -e "$BACKUP_NAME rsync still running. Exiting...."
|
echo -e "$BACKUP_NAME rsync still running. Exiting...."
|
||||||
payload="{\"message\": \"$BACKUP_NAME stopped. rsync-sysctl is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
|
payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
|
||||||
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
|
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -30,7 +30,7 @@ fi
|
||||||
# If an old backup is still running, don't continue
|
# If an old backup is still running, don't continue
|
||||||
if [[ `ps aux | grep rsync | grep -v grep | grep -v $BACKUP_NAME` ]] ; then
|
if [[ `ps aux | grep rsync | grep -v grep | grep -v $BACKUP_NAME` ]] ; then
|
||||||
echo -e "$BACKUP_NAME rsync still running. Exiting...."
|
echo -e "$BACKUP_NAME rsync still running. Exiting...."
|
||||||
payload="{\"message\": \"$BACKUP_NAME stopped. rsync-sysctl is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
|
payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
|
||||||
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
|
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -29,7 +29,7 @@ fi
|
||||||
# If an old backup is still running, don't continue
|
# If an old backup is still running, don't continue
|
||||||
if [[ `ps aux | grep rsync | grep -v grep | grep -v rsync-sysctl` ]] ; then
|
if [[ `ps aux | grep rsync | grep -v grep | grep -v rsync-sysctl` ]] ; then
|
||||||
echo -e "$BACKUP_NAME rsync still running. Exiting...."
|
echo -e "$BACKUP_NAME rsync still running. Exiting...."
|
||||||
payload="{\"message\": \"$BACKUP_NAME stopped. rsync-sysctl is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
|
payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
|
||||||
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
|
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue