diff options
author | Erich Eckner <git@eckner.net> | 2021-06-27 09:47:55 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-06-27 09:47:55 +0200 |
commit | 778206e94bec853345ef04e936aba33ba9573c9e (patch) | |
tree | 0d02de070a200dd729779789424bbf2f39c96419 /print-status-html | |
parent | bbcb65e88d2ab04bf8e66445a8a785608e98015e (diff) | |
download | print-status-778206e94bec853345ef04e936aba33ba9573c9e.tar.xz |
add config file
Diffstat (limited to 'print-status-html')
-rwxr-xr-x | print-status-html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/print-status-html b/print-status-html index 107647c..c82bfa0 100755 --- a/print-status-html +++ b/print-status-html @@ -1,6 +1,6 @@ #!/bin/bash -watch_dirs=('/data/raid/harti') +. /etc/print-status.conf { cat <<EOF @@ -145,14 +145,14 @@ EOF </table> EOF - if [ -f /srv/http/tmp/index.html ]; then + if [ -f "${http_dir}/index.html" ]; then cat <<EOF <table> <tr><th>Name</th><th>Fortschritt</th><th>bisherige Größe</th></tr> EOF - OUTPUT=/srv/http/tmp/index.html backup-progress \ + OUTPUT="${http_dir}/index.html" backup-progress \ | tr -d '()' \ | awk '{print "<tr><td>" $1 "</td><td>" $2 " " $3 "</td><td>" $4 " " $5 "</td></tr>"}' @@ -181,8 +181,8 @@ EOF EOF } | \ - if mountpoint -q /srv/http/tmp; then - sponge /srv/http/tmp/index.html + if mountpoint -q "${http_dir}"; then + sponge "${http_dir}/index.html" else cat fi |