Moved text from README.md to wiki and added notifyonreturn to cron

This commit is contained in:
Henric Andersson 2016-12-11 14:19:17 -08:00
commit 2d538875fb
2 changed files with 9 additions and 17 deletions

View file

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

View file

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