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 title=tinystatus
timeout=10 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" 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(){ command_exists(){
@ -92,13 +92,13 @@ cat << EOF
EOF EOF
for file in ${tmp}/ko/*.status; do for file in ${tmp}/ko/*.status; do
[ -e "${file}" ] || continue [ -e "${file}" ] || continue
name=$(basename "${file}" | sed 's,.status$,,') name="$(basename "${file}" | sed 's,.status$,,')"
status=$(cat "${file}") status="$(cat "${file}")"
echo "<li>${name} <span class='small failed'>(${status})</span><span class='status failed'>Disrupted</span></li>" echo "<li>${name} <span class='small failed'>(${status})</span><span class='status failed'>Disrupted</span></li>"
done done
for file in ${tmp}/ok/*.status; do for file in ${tmp}/ok/*.status; do
[ -e "${file}" ] || continue [ -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>" echo "<li>${name} <span class='status success'>Operationnal</span></li>"
done done
cat << EOF cat << EOF