Assorted shell and Python scripts
1#!/usr/bin/env bash
2
3set -euo pipefail
4
5# Check if feed URL is supplied.
6if (("${#@}" == 0)); then
7 echo "No feed URL has been supplied."
8 exit 1
9fi
10
11# Go to archivebox directory and run scheduled command for supplied
12# feed URL.
13cd /naspool/archivebox
14if ! /home/jas/.local/bin/archivebox add --depth=1 "$1" \
15 >>/naspool/archivebox/logs/schedule.log; then
16 echo "$(date '+%Y-%m-%d %H:%M:%S') ERROR. Exiting."
17fi