From d66dd41cb470e785f1c860f179954f43cb8b8b13 Mon Sep 17 00:00:00 2001 From: iSnackyCracky Date: Fri, 15 Jul 2016 21:28:48 +0200 Subject: [PATCH] Change Exit Code with Cron mode I was using the plexupdate.sh in another script to notify me with pushover after the Update. I've set up different notifications based on the different Exit codes and I was wondering about getting success-installation notifications even though there was no new update. Basically the updatescript is exiting with code 5 when there is no new version (except you force it to install) but only if you dont use the -C option / Cron mode. Else it was just exiting with code 0 there. --- plexupdate.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index 7cfec22..5b5b708 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -384,9 +384,8 @@ fi if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then if [ "${CRON}" = "no" ]; then echo "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download." - exit 5 - fi - exit 0 + fi + exit 5 fi if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then