#!/usr/bin/env bash set -euo pipefail # Check if feed URL is supplied. if (("${#@}" == 0)); then echo "No feed URL has been supplied." exit 1 fi # Go to archivebox directory and run scheduled command for supplied # feed URL. cd /naspool/archivebox if ! /home/jas/.local/bin/archivebox add --depth=1 "$1" \ >>/naspool/archivebox/logs/schedule.log; then echo "$(date '+%Y-%m-%d %H:%M:%S') ERROR. Exiting." fi