YES! Thank you! I have added a script that checks that if a backup is underway, it will wait until it's complete, checking every 5 min:
Code:
bash
#!/bin/bash
#Name of file: vzstart-delay.sh
# Stop the ping-instances service to prevent it from running during backup
systemctl stop ping-instances
while true; do
# Check if a backup is running
if ! proxmox-backup-client status | grep -q "running"; then
#If no backup running, exit the loop
break
else
#Check if ping-instances is running
if systemctl status ping-instances | grep -q "running"; then
# Stop the ping-instances service to prevent it from running during backup
systemctl stop ping-instances
fi
#Wait 300 seconds before checking again
sleep 300
fi
done
# Once the backup is complete, reload the systemd daemon and start the ping-instances service
if ! systemctl status ping-instances | grep -q "running"; then
systemctl daemon-reload
systemctl start ping-instances
fi
It gets called at the beginning of ping-instances.sh:
Code:
#######################
# Check if a backup is running and delay the script if necessary
# Log the start of the script
echo "Starting ping-instances.sh script" >> /var/log/ping-instances.log
# Run the vzstart-delay.sh script and log the event
echo "Running vzstart-delay.sh script to wait for backup completion and start v>
/usr/local/bin/vzstart-delay.sh
#Clay added this script with assistance from Meta AI (2024-12-26)
########################
Although I got assistance from Meta, it was more like I had to teach it LOL
But I'm sure I probably missed something in cleaning up the suggestions it made. Let me know if I need to make any edits.