diff options
author | Erich Eckner <git@eckner.net> | 2021-06-27 20:55:50 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-06-27 20:55:50 +0200 |
commit | 0906c67f7f812899873d5a15d1510d738ed724f3 (patch) | |
tree | 1b714c7c706e654768a846a04d7f50cceecbc4e6 | |
parent | 97bcf1689b3406f0860de018a1f9d33d99613cc8 (diff) | |
download | print-status-0906c67f7f812899873d5a15d1510d738ed724f3.tar.xz |
print-status-html: *really* ignore empty watch_dirs
-rwxr-xr-x | print-status-html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/print-status-html b/print-status-html index 9e67738..0815cd0 100755 --- a/print-status-html +++ b/print-status-html @@ -4,12 +4,13 @@ { - if [ -n "${watch_dirs[@]}" ]; then + printf '%s\n' \ + '<html><head><title>Status Of Backup Server</title></head><body>' - cat <<EOF -<html><head><title>Status Of Backup Server</title></head><body> -<h1>Partitions</h1> -EOF + if [ -n "${!watch_dirs[@]}" ]; then + + printf '%s\n' \ + '<h1>Partitions</h1>' for dir in "${watch_dirs[@]}"; do { |