From 97bcf1689b3406f0860de018a1f9d33d99613cc8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 27 Jun 2021 10:12:06 +0200 Subject: print-status-html: make watch_dirs optional --- print-status-html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/print-status-html b/print-status-html index c82bfa0..9e67738 100755 --- a/print-status-html +++ b/print-status-html @@ -3,24 +3,29 @@ . /etc/print-status.conf { - cat <Status Of Backup Server

Partitions

EOF - for dir in "${watch_dirs[@]}"; do - { - du -sxh "${dir}" - df -h "${dir}" \ + for dir in "${watch_dirs[@]}"; do + { + du -sxh "${dir}" + df -h "${dir}" \ | sed '1d' - } \ + } \ | tr '\n' ' ' - printf '\n' - done \ + printf '\n' + done \ | awk '{ print $2 ": " $1 "B (partition: " $5 "B of " $4 "B used, " $6 "B free)
" }' + fi + cat <Crypt Devices EOF -- cgit v1.2.3-54-g00ecf