From 248a821e0d83f6bd7221c33832c63c99041973c2 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 6 Jan 2017 14:22:52 +0100 Subject: [PATCH] dsa-check-dabackup-server: replace /org/backup.debian.org with /srv/backups/da-backup --- dsa-nagios-checks/checks/dsa-check-dabackup-server | 11 ++++++----- dsa-nagios-checks/debian/changelog | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dsa-nagios-checks/checks/dsa-check-dabackup-server b/dsa-nagios-checks/checks/dsa-check-dabackup-server index a08fec7..906505b 100755 --- a/dsa-nagios-checks/checks/dsa-check-dabackup-server +++ b/dsa-nagios-checks/checks/dsa-check-dabackup-server @@ -27,6 +27,7 @@ set -e set -u AUTHKEYSFILE=/etc/ssh/userkeys/root +BASE=/srv/backups/da-backup err=0 @@ -71,7 +72,7 @@ backup_manager_sources=`tempfile` trap "rm -f '$rsync_targets' '$backup_manager_sources'" 0 1 2 5 15 cat "$AUTHKEYSFILE" | grep '^command=' | - sed -e 's/",no-por.*//' -e 's/.*--ignore-errors . //' -e 's#/org/backup.debian.org/staging/##' | + sed -e 's/",no-por.*//' -e 's/.*--ignore-errors . //' -e "s#${BASE}/staging/##" | grep -v 'command="/usr/lib/da-backup/da-backup-ssh-wrap ' | sort > "$rsync_targets" @@ -88,20 +89,20 @@ fi # check that everything listed as either source or destination by da-backup-manager does exist - if stuff is new it might still be missing tho for i in `awk -F = '$1=="source" {print $2}' /etc/da-backup-manager/* `; do - if ! [ -d "/org/backup.debian.org/staging/$i" ]; then + if ! [ -d "${BASE}/staging/$i" ]; then log warn echo "Warning: source $i does not exist" fi done for i in ` awk -F = '$1=="destination"{print $2}' /etc/da-backup-manager/* `; do - if ! [ -d "/org/backup.debian.org/backups/$i" ]; then + if ! [ -d "${BASE}/backups/$i" ]; then log warn echo "Warning: destination $i does not exist (if it is new, it takes a day)" fi done # check that everything that does exist has an entry in da-backup-manager -cd /org/backup.debian.org/staging +cd "${BASE}/staging" for i in */*; do if ! [ -d "$i" ]; then log warn @@ -113,7 +114,7 @@ for i in */*; do echo "staging/$i is not listed anywhere in /etc/da-backup-manager" fi done -cd /org/backup.debian.org/backups +cd "${BASE}/backups" for i in */*; do if ! [ -d "$i" ]; then log warn diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 6045e3e..fc7dbec 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -37,6 +37,8 @@ dsa-nagios-checks (108+XXXX) UNRELEASED; urgency=medium * dsa-check-zone-rrsig-expiration-many: sort zone details by state. * dsa-check-zone-signature-all: add. * dsa-check-timedatectl: add + * dsa-check-dabackup-server: replace /org/backup.debian.org with + /srv/backups/da-backup. [ Tollef Fog Heen ] * dsa-update-unowned-file-status: ignore fdescfs, used for /dev/fd on -- 2.20.1