Standardize on all uppercase variables

This commit is contained in:
Alex Malinovich 2016-08-16 12:12:56 -07:00
commit 7470576cd6

View file

@ -125,7 +125,7 @@ URL_DOWNLOAD_PUBLIC=https://plex.tv/api/downloads/1.json
cronexit() {
# Don't give anything but true error codes if in CRON mode
rawexit=$1
RAWEXIT=$1
if [ "${CRON}" = "yes" -a $1 -gt 1 -a $1 -lt 255 ]; then
exit 0
fi
@ -206,8 +206,8 @@ fi
if [ "${CRON}" = "yes" -a "${QUIET}" = "no" ]; then
# If running in cron mode, redirect STDOUT to temporary file
stdoutlog="$(mktemp)"
exec 3>&1 >"${stdoutlog}"
STDOUTLOG="$(mktemp)"
exec 3>&1 >"${STDOUTLOG}"
elif [ "${QUIET}" = "yes" ]; then
# Redirect STDOUT to dev null. Use >&3 if you really, really, REALLY need to print to STDOUT
exec 3>&1 > /dev/null
@ -331,11 +331,11 @@ keypair() {
# Setup an cronexit handler so we cleanup
function cleanup {
if [ "${CRON}" = yes -a "${rawexit}" -ne 5 -a -f "${stdoutlog}" ]; then
if [ "${CRON}" = yes -a "${RAWEXIT}" -ne 5 -a -f "${STDOUTLOG}" ]; then
exec 1>&3
cat "${stdoutlog}"
cat "${STDOUTLOG}"
fi
rm "${stdoutlog}" 2>/dev/null >/dev/null
rm "${STDOUTLOG}" 2>/dev/null >/dev/null
rm /tmp/postdata 2>/dev/null >/dev/null
rm /tmp/raw 2>/dev/null >/dev/null
rm /tmp/failcause 2>/dev/null >/dev/null