This commit is contained in:
albert 2024-05-13 09:35:50 +09:00
parent 154e5fedbb
commit 29c6245dab
Signed by: albert
GPG key ID: 3895DD267CA11BA9
4 changed files with 4 additions and 4 deletions

View file

@ -23,7 +23,6 @@
tree # CLI directory display software tree # CLI directory display software
nmap # network mapping / discovery software nmap # network mapping / discovery software
busybox # General linux commands, nslookup, dig, etc busybox # General linux commands, nslookup, dig, etc
busybox # Linux utilities
ethtool # Ethernet troubleshooting:with ethtool # Ethernet troubleshooting:with
file # Shows the types of files file # Shows the types of files
inputs.superfile.packages.${system}.default # Superfile CLI file browser inputs.superfile.packages.${system}.default # Superfile CLI file browser

View file

@ -28,7 +28,7 @@ fi
# If an old backup is still running, don't continue # If an old backup is still running, don't continue
count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l) count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l)
if [[ $count -ge 1 ]] ; then if [[ $count -ge 2 ]] ; then
echo -e "$BACKUP_NAME rsync still running. Exiting...." 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\"}" 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"

View file

@ -28,7 +28,7 @@ fi
# If an old backup is still running, don't continue # If an old backup is still running, don't continue
count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l) count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l)
if [[ $count -ge 1 ]] ; then if [[ $count -ge 2 ]] ; then
echo -e "$BACKUP_NAME rsync still running. Exiting...." 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\"}" 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"

View file

@ -7,7 +7,8 @@ curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json"
# If an old backup is still running, don't continue # If an old backup is still running, don't continue
count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l) count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l)
if [[ $count -ge 1 ]] ; then if [[ $count -ge 2 ]] ; then
# There will always be at least 1: the current cronjob that's running
echo -e "$BACKUP_NAME rsync still running. Exiting...." 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\"}" 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"