Etwa so:
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
#!/bin/bash
KEY=,,..."
SECRET=,,..."
HOST="firewall"
BKPPATH="/usr/SHARE/BACKUP/OPNsense"
#
set -x
#
###curl -s -k -u $KEY:$SECRET https://$HOST/api/backup/backup/download -o $BKPPATH/opnsense-config-$(date +%F_%H%M%S).xml
curl -s -k -u "${KEY}":"${SECRET}" https://${HOST}/api/core/backup/download/this --create-dirs -o $BKPPATH/opnsense-config-$(date +%F_%H%M%S).xml
#
find $PATH/ -type f -name '*.xml' -mtime +42 -exec rm {} \;
#