mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 12:59:40 -07:00
Changes based on feedback
This commit is contained in:
parent
e23a114080
commit
a4f8120b98
2 changed files with 6 additions and 7 deletions
|
@ -48,10 +48,10 @@ LOGFILE=$(mktemp /tmp/plexupdate.cron.XXXX)
|
|||
|
||||
RET=0
|
||||
if $LOGGING; then
|
||||
"${SCRIPT}" --config "${CONF}" --notify-success 2>&1 | tee ${LOGFILE} | logger -t plexupdate -p daemon.info
|
||||
"${SCRIPT}" "${CONF}" 2>&1 | tee ${LOGFILE} | logger -t plexupdate -p daemon.info
|
||||
RET="${PIPESTATUS[0]}"
|
||||
else
|
||||
"${SCRIPT}" --config "${CONF}" --notify-success >${LOGFILE} 2>&1
|
||||
"${SCRIPT}" "${CONF}" >${LOGFILE} 2>&1
|
||||
RET=$?
|
||||
fi
|
||||
|
||||
|
|
|
@ -138,8 +138,7 @@ usage() {
|
|||
echo " --pass <plex.tv password> Plex.TV password"
|
||||
echo " --server <Plex server address> Address of Plex Server"
|
||||
echo " --port <Plex server port> Port for Plex Server. Used with --server"
|
||||
echo ""
|
||||
echo " --notify-success Makes plexupdate return 10 on download/update success (instead of 0)"
|
||||
echo " --notify-success Set exit code 10 if update is available/installed"
|
||||
echo ""
|
||||
exit 0
|
||||
}
|
||||
|
@ -217,7 +216,7 @@ getPlexServerToken() {
|
|||
if [ ! -z "${I}" -a -f "${I}${PREFFILE}" ]; then
|
||||
sed -n 's/.*PlexOnlineToken="\([[:alnum:]]*\).*".*/\1/p' "${I}${PREFFILE}" 2>/dev/null
|
||||
if [ $? -ne 0 -a -z "${EMAIL}" -a -z "${PASS}" ]; then
|
||||
error "Do not have permission to read token from Plex Server preference file"
|
||||
error "Do not have permission to read token from Plex Server preference file (${I}${PREFFILE})"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
@ -293,7 +292,7 @@ do
|
|||
(--server) shift; PLEXSERVER=$(trimQuotes ${1});;
|
||||
(--port) shift; PLEXPORT=$(trimQuotes ${1});;
|
||||
|
||||
(--notify-success) shift; NOTIFY=yes;;
|
||||
(--notify-success) NOTIFY=yes;;
|
||||
|
||||
(--) ;;
|
||||
(-*) error "Unrecognized option $1"; usage; exit 1;;
|
||||
|
@ -667,7 +666,7 @@ if [ "${AUTOINSTALL}" = "yes" ]; then
|
|||
RET=$?
|
||||
if [ ${RET} -ne 0 ]; then
|
||||
# Clarify why this failed, so user won't be left in the dark
|
||||
error "Was unable to install due to problems with package from plex.tv or your local linux setup"
|
||||
error "Failed to install update. Command '${DISTRO_INSTALL} "${DOWNLOADDIR}/${FILENAME}"' returned error code ${RET}"
|
||||
exit ${RET}
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue