From cfe3776936977722df2a46e686a4c0be77c12a3c Mon Sep 17 00:00:00 2001 From: Henric Andersson Date: Sun, 11 Dec 2016 13:11:51 -0800 Subject: [PATCH] Deprecated exit code 5 and corrcted cronwrapper and enhanced README - plexupdate.sh will consider no new version as success - cronwrapper will not print anything unless it truly fails - README.md updated to provide more details about .plexupdate --- README.md | 16 ++++++++++++++++ extras/cronwrapper | 5 +---- plexupdate.sh | 3 +-- 3 files changed, 18 insertions(+), 6 deletions(-) mode change 100644 => 100755 README.md diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 1c0735f..271b420 --- a/README.md +++ b/README.md @@ -161,6 +161,22 @@ But here are some of the more useful ones: See explanation in the top of this document. +## I saw it, but I miss `.plexupdate` + +If you desparately want the old behavior, please add the following to `/etc/plexupdate.conf` : + +``` +if [ -f ~/.plexupdate ] + source ~/.plexupdate +fi +``` + +This will make `plexupdate.sh` look in current user's home directory for configuration file. But this should be considered a stop-gap solution and is not officially endorsed. + +## Do I have to use the `extras/installer.sh` ? + +Of course not, anything you find under `extras/` is optional and only provided as a easier way to get `plexupdate.sh` up and running quickly. + ## What email and password are you talking about The email and password for http://plex.tv diff --git a/extras/cronwrapper b/extras/cronwrapper index a7ba31b..eb1a35c 100755 --- a/extras/cronwrapper +++ b/extras/cronwrapper @@ -59,12 +59,9 @@ else RET=$? fi -if [ $RET -ne 2 -a $RET -ne 5 ]; then +if [ $RET -ne 0 ]; then # Make sure user gets an email about this cat ${LOGFILE} >&2 -else - # Nah, not important - RET=0 fi rm "${LOGFILE}" 2>/dev/null diff --git a/plexupdate.sh b/plexupdate.sh index 6473c8d..6895e2d 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -24,7 +24,6 @@ # 2 if file already downloaded # 3 if page layout has changed. # 4 if download fails -# 5 if version already installed # 6 if update was deferred due to usage # # All other return values not documented. @@ -563,7 +562,7 @@ fi if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then info "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download." - exit 5 + exit 0 fi if [ -f "${DOWNLOADDIR}/${FILENAME}" ]; then