Fix variables quotes

This commit is contained in:
BDR 2021-03-27 23:34:27 +01:00
parent 27b7891bd7
commit 65a03bf3f3

View file

@ -2,7 +2,7 @@
title=tinystatus
timeout=10
tmp=${tmpdir:-/tmp/tinystatus}
tmp="${tmpdir:-/tmp/tinystatus}"
useragent="User-Agent: Mozilla/5.0 (X11; Linux x86_64; Debian) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
command_exists(){
@ -92,13 +92,13 @@ cat << EOF
EOF
for file in ${tmp}/ko/*.status; do
[ -e "${file}" ] || continue
name=$(basename "${file}" | sed 's,.status$,,')
status=$(cat "${file}")
name="$(basename "${file}" | sed 's,.status$,,')"
status="$(cat "${file}")"
echo "<li>${name} <span class='small failed'>(${status})</span><span class='status failed'>Disrupted</span></li>"
done
for file in ${tmp}/ok/*.status; do
[ -e "${file}" ] || continue
name=$(basename "${file}" | sed 's,.status$,,')
name="$(basename "${file}" | sed 's,.status$,,')"
echo "<li>${name} <span class='status success'>Operationnal</span></li>"
done
cat << EOF