|
|
|
@ -41,7 +41,7 @@ EOFFAIL
|
|
|
|
|
|
|
|
|
|
# test for no version set or opt out for autoupdates
|
|
|
|
|
if [[ -z "$VERSION" ]] || [[ "$VERSION" == "0" ]] || [[ ! -z "$ADVANCED_DISABLEUPDATES" ]]; then
|
|
|
|
|
printf "\n\n\n%s\n\n\n" "$(</tmp/no-version.nfo)"
|
|
|
|
|
printf '\n\n\n%s\n\n\n' "$(</tmp/no-version.nfo)"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
|
|
|
|
|
# preference file found, possibly first startup. #
|
|
|
|
|
#####################################################
|
|
|
|
|
EOFTOKEN
|
|
|
|
|
printf "\n\n\n%s\n\n\n" "$(</tmp/no-token.nfo)"
|
|
|
|
|
printf '\n\n\n%s\n\n\n' "$(</tmp/no-token.nfo)"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -76,7 +76,7 @@ cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
|
|
|
|
|
# plex token found in the preference file #
|
|
|
|
|
#####################################################
|
|
|
|
|
EOFTOKEN
|
|
|
|
|
printf "\n\n\n%s\n\n\n" "$(</tmp/no-token.nfo)"
|
|
|
|
|
printf '\n\n\n%s\n\n\n' "$(</tmp/no-token.nfo)"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -106,7 +106,7 @@ last=$?
|
|
|
|
|
|
|
|
|
|
# test if deb file size is ok, or if download failed
|
|
|
|
|
if [[ "$last" -gt "0" ]] || [[ $(stat -c %s /tmp/plexmediaserver_"${REMOTE_VERSION}"_amd64.deb) -lt 10000 ]]; then
|
|
|
|
|
printf "\n\n\n%s\n\n\n" "$(</tmp/update_fail.nfo)"
|
|
|
|
|
printf '\n\n\n%s\n\n\n' "$(</tmp/update_fail.nfo)"
|
|
|
|
|
exit 0
|
|
|
|
|
# if ok, try to install it.
|
|
|
|
|
else
|
|
|
|
|