Make VERBOSE useful again

This commit is contained in:
Alex Malinovich 2017-02-20 16:28:10 -08:00
commit b76432e1cd
3 changed files with 6 additions and 3 deletions

View file

@ -4,9 +4,9 @@ URL_LOGIN='https://plex.tv/users/sign_in.json'
getPlexToken() {
if [ -n "$TOKEN" ]; then
echo "Fetching token from config"
[ "$VERBOSE" = "yes" ] && echo "Fetching token from config"
elif getPlexServerToken; then
echo "Fetching token from Plex server"
[ "$VERBOSE" = "yes" ] && echo "Fetching token from Plex server"
elif [ -z "$TOKEN" -a -n "$EMAIL" -a -n "$PASS" ]; then
#TOFIX
echo "WARNING: Storing your email and password has been deprecated. Please re-run extras/installer.sh or see LINK_TO_FAQ."
@ -121,6 +121,8 @@ getPlexWebToken() {
# Clean up temp files since they may contain sensitive information
rm "${FILE_FAILCAUSE}" "${FILE_POSTDATA}" "${FILE_RAW}"
[ -n "$TOKEN" ] # simulate exit status
}
if [ "$(basename "$0")" = "get-plex-token" ]; then

View file

@ -5,6 +5,7 @@ FULL_PATH="/opt/plexupdate"
CONFIGFILE="/etc/plexupdate.conf"
CONFIGCRON="/etc/plexupdate.cron.conf"
CRONWRAPPER="/etc/cron.daily/plexupdate"
VERBOSE=yes #to be inherited by get-plex-token, do not save to config
# default options
AUTOINSTALL=yes

View file

@ -495,7 +495,7 @@ if [ "${CHECKONLY}" = "yes" ]; then
info "Your OS reports Plex $INSTALLED_VERSION installed, newer version is available (${AVAIL})"
exit 7
else
info "You are running latest version of Plex (${INSTALLED_VERSION})"
info "You are running the latest version of Plex (${INSTALLED_VERSION})"
fi
exit 0
fi