mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 12:59:40 -07:00
Exit with code 6 if an update is available/installed
This commit is contained in:
parent
fdc24ff187
commit
1b971e9da5
1 changed files with 8 additions and 3 deletions
|
@ -607,8 +607,7 @@ if [ "${SKIP_DOWNLOAD}" = "no" ]; then
|
||||||
info "File downloaded"
|
info "File downloaded"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sha1sum --status -c "${FILE_SHA}"
|
if ! sha1sum --status -c "${FILE_SHA}"; then
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
error "Downloaded file corrupt. Try again."
|
error "Downloaded file corrupt. Try again."
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
fi
|
||||||
|
@ -628,6 +627,11 @@ if [ "${AUTOINSTALL}" = "yes" ]; then
|
||||||
# no elif since DISTRO_INSTALL will produce error output for us
|
# no elif since DISTRO_INSTALL will produce error output for us
|
||||||
|
|
||||||
${DISTRO_INSTALL} "${DOWNLOADDIR}/${FILENAME}"
|
${DISTRO_INSTALL} "${DOWNLOADDIR}/${FILENAME}"
|
||||||
|
RET=$?
|
||||||
|
if [ $RET -ne 0 ]; then
|
||||||
|
error "Error reported while installing ${FILENAME}."
|
||||||
|
exit $RET
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${AUTODELETE}" = "yes" ]; then
|
if [ "${AUTODELETE}" = "yes" ]; then
|
||||||
|
@ -656,4 +660,5 @@ if [ "${AUTOSTART}" = "yes" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
# If we've made it this far and haven't exited it means an update was downloaded and/or installed
|
||||||
|
exit 6
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue