summaryrefslogtreecommitdiff
path: root/print-status
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
parentbbcb65e88d2ab04bf8e66445a8a785608e98015e (diff)
downloadprint-status-778206e94bec853345ef04e936aba33ba9573c9e.tar.xz
add config file
Diffstat (limited to 'print-status')
-rwxr-xr-xprint-status8
1 files changed, 5 insertions, 3 deletions
diff --git a/print-status b/print-status
index c2bdf8a..eaff49c 100755
--- a/print-status
+++ b/print-status
@@ -1,5 +1,7 @@
#!/bin/bash
+. /etc/print-status.conf
+
{
find /dev/mapper -mindepth 1 -maxdepth 1 \( -name 'leg*' -o -name 'foot*' \) -printf '%f\n' \
| sort -u \
@@ -38,9 +40,9 @@
| grep -v '^\s*$'
fi
} | \
- if mountpoint -q /srv/http/tmp; then
- sponge /srv/http/tmp/status
- date +%s > /srv/http/tmp/status.time
+ if mountpoint -q "${http_dir}"; then
+ sponge "${http_dir}/status"
+ date +%s > "${http_dir}/status.time"
else
cat
fi