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
This commit is contained in:
Henric Andersson 2016-12-11 13:11:51 -08:00
commit cfe3776936
3 changed files with 18 additions and 6 deletions

16
README.md Normal file → Executable file
View file

@ -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

View file

@ -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

View file

@ -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