mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 21:33:16 -07:00
Make VERBOSE useful again
This commit is contained in:
parent
ba9f7e0816
commit
b76432e1cd
3 changed files with 6 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue