mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -07:00
Fix getPlexServerToken if installer.sh is being run from wget
This commit is contained in:
parent
b76432e1cd
commit
c7573c2fc8
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ getPlexServerToken() {
|
|||
|
||||
for I in "${VALIDPATHS[@]}" ; do
|
||||
if [ ! -z "${I}" -a -f "${I}${PREFFILE}" ]; then
|
||||
if [ "$(basename $0)" = "installer.sh" ]; then
|
||||
# When running installer.sh directly from wget, $0 will return bash
|
||||
if [ "$(basename $0)" = "installer.sh" -o "$(basename $0)" = "bash" ]; then
|
||||
TOKEN=$(sudo sed -n 's/.*PlexOnlineToken="\([[:alnum:]]*\).*".*/\1/p' "${I}${PREFFILE}" 2>/dev/null)
|
||||
else
|
||||
TOKEN=$(sed -n 's/.*PlexOnlineToken="\([[:alnum:]]*\).*".*/\1/p' "${I}${PREFFILE}" 2>/dev/null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue