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 | |
parent | bbcb65e88d2ab04bf8e66445a8a785608e98015e (diff) | |
download | print-status-778206e94bec853345ef04e936aba33ba9573c9e.tar.xz |
add config file
Diffstat (limited to 'print-status')
-rwxr-xr-x | print-status | 8 |
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 |