Assorted shell and Python scripts

Refactor

Changed files
+19 -1
+9 -1
encrypt_mail
···
set -euxo pipefail
+
if test -f "${HOME}/.env_common"; then
+
source "${HOME}/.env_common"
+
fi
+
cleanup() {
echo "Cleaning up"
rm -rfv /tmp/mail*
···
scp "/tmp/mail-${DATE}.tar.gz.age" jas@aux-remote.carp-wyvern.ts.net:/auxpool/encrypted_mail
ssh jas@aux-remote.carp-wyvern.ts.net -- find /auxpool/encrypted_mail -maxdepth 1 -type f -mtime +7 -delete
-
curl -d "encrypt_mail: success" nas-aux.carp-wyvern.ts.net/backups
+
curl \
+
-H prio:default \
+
-H tags:incoming_envelope \
+
-d "encrypt_mail: success" \
+
"${NTFY_SERVER}/backups"
# vim: ts=4 sts=4 sw=4 et ai ft=bash
+10
hyperreal_backup
···
set -euxo pipefail
+
if test -f "${HOME}/.env_common"; then
+
source "${HOME}/.env_common"
+
fi
+
BORG_ARCHIVE=$(borg list ssh://root@hyperreal.carp-wyvern.ts.net/mnt/borgbackup/hyperreal | tail -n 1 | awk '{print $1}')
ARCHIVE_BASENAME=$(echo "$BORG_ARCHIVE" | cut -d "T" -f 1)
···
"/naspool/hyperreal_backup/${ARCHIVE_BASENAME}.tar"
find /naspool/hyperreal_backup -maxdepth 1 -type f -mtime +7 -exec rm -fv {} \;
+
+
curl \
+
-H prio:default \
+
-H tags:incoming_envelope \
+
-d "hyperreal_backup: success" \
+
"${NTFY_SERVER}/backups"
# vim: ts=4 sts=4 sw=4 et ai ft=bash