diff --git a/README.md b/README.md index 271b420..305bab8 100755 --- a/README.md +++ b/README.md @@ -161,18 +161,6 @@ 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. @@ -188,3 +176,7 @@ If you use certain characters (such as `$`) in your password, bash will interpre i.e. `PASS="MyP4$$w0rD"` will not work, but changing to it to `PASS='MyP4$$w0rD'` will If it's still not working, run `plexupdate.sh` with `-v` which prints out the email and password used to login which might help you understand what the problem is. + +# Not finding what you're looking for? + +See https://github.com/mrworf/plexupdate/wiki for more information diff --git a/extras/cronwrapper b/extras/cronwrapper index eb1a35c..ea0d585 100755 --- a/extras/cronwrapper +++ b/extras/cronwrapper @@ -14,11 +14,11 @@ # LOGGING if true, logs all output to syslog daemon facility # (typically /var/log/daemon.log or /var/log/syslog) # -# Set CONFIGURED to true once you've setup the previous three -# options. +# NOTIFYONRETURN is used to define which return codes from plexupdate +# that you want to be notified for. By default, all +# non-zero return codes produce a notification. # - if [ ! -f /etc/plexupdate.cron.conf ]; then echo "ERROR: You have not configured /etc/plexupdate.cron.conf" >&2 exit 255 @@ -59,8 +59,8 @@ else RET=$? fi -if [ $RET -ne 0 ]; then - # Make sure user gets an email about this +if [ -z "${NOTIFYONRETURN}" -a $RET -ne 0 ] || [[ "${NOTIFYONRETURN}" == *$RET* ]] ; then + # Make sure user gets an email about this (when not success or if user has specified when) cat ${LOGFILE} >&2 fi