mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 21:33:16 -07:00
Check if server activity call requires a token before asking for one (#202)
This commit is contained in:
parent
ab7f4052b1
commit
193f8f832a
2 changed files with 14 additions and 12 deletions
|
@ -334,16 +334,9 @@ if [ "${CHECKUPDATE}" = "yes" -a "${AUTOUPDATE}" = "no" ]; then
|
|||
popd > /dev/null
|
||||
fi
|
||||
|
||||
if [ "${PUBLIC}" = "no" -o -n "${PLEXSERVER}" ] && ! getPlexToken; then
|
||||
if [ "${PUBLIC}" = "no" ]; then
|
||||
error "Unable to get Plex token, falling back to public release"
|
||||
PUBLIC="yes"
|
||||
fi
|
||||
|
||||
if [ -n "${PLEXSERVER}" ]; then
|
||||
error "Unable to get Plex token, server activity check will be skipped"
|
||||
PLEXSERVER=
|
||||
fi
|
||||
if [ "${PUBLIC}" = "no" ] && ! getPlexToken; then
|
||||
error "Unable to get Plex token, falling back to public release"
|
||||
PUBLIC="yes"
|
||||
fi
|
||||
|
||||
if [ "$PUBLIC" != "no" ]; then
|
||||
|
@ -491,7 +484,7 @@ fi
|
|||
|
||||
if [ -n "${PLEXSERVER}" -a "${AUTOINSTALL}" = "yes" ]; then
|
||||
# Check if server is in-use before continuing (thanks @AltonV, @hakong and @sufr3ak)...
|
||||
if running "${PLEXSERVER}" "${TOKEN}" "${PLEXPORT}"; then
|
||||
if running "${PLEXSERVER}" "${PLEXPORT}"; then
|
||||
error "Server ${PLEXSERVER} is currently being used by one or more users, skipping installation. Please run again later"
|
||||
exit 6
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue