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() { getPlexToken() {
if [ -n "$TOKEN" ]; then if [ -n "$TOKEN" ]; then
echo "Fetching token from config" [ "$VERBOSE" = "yes" ] && echo "Fetching token from config"
elif getPlexServerToken; then 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 elif [ -z "$TOKEN" -a -n "$EMAIL" -a -n "$PASS" ]; then
#TOFIX #TOFIX
echo "WARNING: Storing your email and password has been deprecated. Please re-run extras/installer.sh or see LINK_TO_FAQ." 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 # Clean up temp files since they may contain sensitive information
rm "${FILE_FAILCAUSE}" "${FILE_POSTDATA}" "${FILE_RAW}" rm "${FILE_FAILCAUSE}" "${FILE_POSTDATA}" "${FILE_RAW}"
[ -n "$TOKEN" ] # simulate exit status
} }
if [ "$(basename "$0")" = "get-plex-token" ]; then if [ "$(basename "$0")" = "get-plex-token" ]; then

View file

@ -5,6 +5,7 @@ FULL_PATH="/opt/plexupdate"
CONFIGFILE="/etc/plexupdate.conf" CONFIGFILE="/etc/plexupdate.conf"
CONFIGCRON="/etc/plexupdate.cron.conf" CONFIGCRON="/etc/plexupdate.cron.conf"
CRONWRAPPER="/etc/cron.daily/plexupdate" CRONWRAPPER="/etc/cron.daily/plexupdate"
VERBOSE=yes #to be inherited by get-plex-token, do not save to config
# default options # default options
AUTOINSTALL=yes 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})" info "Your OS reports Plex $INSTALLED_VERSION installed, newer version is available (${AVAIL})"
exit 7 exit 7
else else
info "You are running latest version of Plex (${INSTALLED_VERSION})" info "You are running the latest version of Plex (${INSTALLED_VERSION})"
fi fi
exit 0 exit 0
fi fi