From 8744339dfcb8bfe7a71a99117bed8c5735a19f2f Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 29 Nov 2016 21:15:12 -0800 Subject: [PATCH] Store correct exit status in cronwrapper if LOGGING is set --- extras/cronwrapper | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extras/cronwrapper b/extras/cronwrapper index 452941f..1b1d52d 100755 --- a/extras/cronwrapper +++ b/extras/cronwrapper @@ -45,9 +45,7 @@ LOGFILE=$(mktemp /tmp/plexupdate.cron.XXXX) RET=0 if $LOGGING; then "${SCRIPT}" "${CONF}" 2>&1 | tee ${LOGFILE} | logger -t plexupdate -p daemon.info - if grep -q '^ERROR:' ${LOGFILE}; then - RET=1 - fi + RET="${PIPESTATUS[0]}" else "${SCRIPT}" "${CONF}" >${LOGFILE} 2>&1 RET=$?