Split local variable declaration from assignment

This allows the return code to be correctly set.  Previously, RET was always being set to 0... the result of assigning the local variable.
This commit is contained in:
guyincognito24601 2017-10-08 11:05:02 -04:00 committed by GitHub
commit 59fe8872d2

View file

@ -179,7 +179,8 @@ getLocalSHA() {
# RNNG # RNNG
running() { running() {
# If a server is unclaimed, it probably doesn't have TLS enabled either # If a server is unclaimed, it probably doesn't have TLS enabled either
local DATA="$(wget -q -O - http://$1:$2/status/sessions)" local DATA
DATA="$(wget -q -O - http://$1:$2/status/sessions)"
local RET=$? local RET=$?
if [ ${RET} -eq 6 ]; then if [ ${RET} -eq 6 ]; then