summaryrefslogtreecommitdiff
path: root/print-status-html
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-06-27 09:47:55 +0200
committerErich Eckner <git@eckner.net>2021-06-27 09:47:55 +0200
commit778206e94bec853345ef04e936aba33ba9573c9e (patch)
tree0d02de070a200dd729779789424bbf2f39c96419 /print-status-html
parentbbcb65e88d2ab04bf8e66445a8a785608e98015e (diff)
downloadprint-status-778206e94bec853345ef04e936aba33ba9573c9e.tar.xz
add config file
Diffstat (limited to 'print-status-html')
-rwxr-xr-xprint-status-html10
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&ouml;&szlig;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