# mkdir /var/www/html/opnsense/FreeBSD:11:amd64
# RSYNC_PROXY=proxy.svc.cal-net.nl:3128 \rsync \--archive \--exclude=LibreSSL \--exclude=libressl \--hard-links \--numeric-ids \--stats \"rsync://mirror.ams1.nl.leaseweb.net/opnsense/FreeBSD:11:amd64/19.1" \"/var/www/html/opnsense/FreeBSD:11:amd64/"
#!/usr/bin/env bashMIRROR="mirror.wdc1.us.leaseweb.net"LOCAL_MIRROR="/export/home2/mirror"REPOPATH="opnsense"# Determine latest major FreeBSD release offeredRELEASE=$(rsync rsync://${MIRROR}/${REPOPATH}/ |& \ grep FreeBSD | grep amd64 | tail -1 | awk '{print $5}')REPOPATH="${REPOPATH}/$RELEASE"# Determine latest opnsense release offeredREV=$(rsync rsync://${MIRROR}/${REPOPATH}/ |& \ grep -v snapshots | tail -1 | awk '{print $5}')# Retrieve the repository, using as much local information as is available (-y)rsync --archive -Py \ --exclude=LibreSSL \ --exclude=libressl \ --hard-links \ --numeric-ids \ --stats \ rsync://${MIRROR}/${REPOPATH}/$REV ${LOCAL_MIRROR}/${REPOPATH}