Fix quoting in running(). Fixes #227

This commit is contained in:
Alex Malinovich 2018-03-10 13:24:06 -08:00
commit a6953f1217

View file

@ -197,7 +197,7 @@ running() {
if [ ${RET} -eq 0 ]; then
# Get a total count of active media (MediaContainer size), then deduct one for every paused stream.
# If all streams are paused, we consider the server to not be active.
local mediacount="$(awk -F'"' '/<MediaContainer size="[0-9]+">/ {count+=$2}; /<Player[^>]* state="paused"/ {count--}; END {print count}' <<< ${DATA})"
local mediacount="$(awk -F'"' '/<MediaContainer size="[0-9]+">/ {count+=$2}; /<Player[^>]* state="paused"/ {count--}; END {print count}' <<< "${DATA}")"
[ $mediacount -gt 0 ] && return 0
fi