I've been digging the web and forums and haven't found a solution for some sort of notification, either email or discord to notify me like regular VM backups when backing up from a host using the proxmox-backup-client. Simply, I need to get a notification via email or discord web hook on success/failure for the following script which is run as a service in system.d and triggered by the second code segment. Any help would be greatly appreciated!
Code:
[Unit]
Description=Run Backups
[Service]
Type=oneshot
#Run as backup
User=root
Group=root
#Allow up to 15% CPU
CPUQuota=15%
#Backup settings
Environment=PBS_REPOSITORY=redacted
Environment=PBS_PASSWORD=redacted
Environment=PBS_FINGERPRINT=redacted
#Run proxmox backup client for the passed directory
ExecStart=proxmox-backup-client backup %i.pxar:/pool/%i --all-file-systems true --backup-id "redacted_%i" --exclude */.zfs/ --change-detection-mode=metadata
[Install]
WantedBy=default.target
Code:
[Unit]
Description=Backup downloads
RefuseManualStart=no
RefuseManualStop=no
[Timer]
#Run at midnight every day
OnCalendar=*-*-* 00:00:00
Unit=pbs-client@downloads.service
[Install]
WantedBy=timers.target