From 030305fc22b16851935de4dc52f912c550bdbd09 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 15 May 2019 13:58:42 +0200 Subject: o New borg. --- ansible/roles/borg-client/templates/bin/tergum-post | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ansible/roles/borg-client/templates/bin/tergum-post (limited to 'ansible/roles/borg-client/templates/bin/tergum-post') diff --git a/ansible/roles/borg-client/templates/bin/tergum-post b/ansible/roles/borg-client/templates/bin/tergum-post new file mode 100644 index 0000000..647bf5b --- /dev/null +++ b/ansible/roles/borg-client/templates/bin/tergum-post @@ -0,0 +1,18 @@ +#!/bin/bash + +set -euo pipefail + +cd / + +instance=$1; shift + +/usr/sbin/sendmail -t < +Subject: Backup @ $HOSTNAME +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +$(systemctl status --full 2>&1) +$(journalctl --since today --unit tergum@$instance 2>&1) +ERRMAIL -- cgit v1.2.3