Skip to content

Commit

Permalink
Update lsio-plex-claim.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored Oct 4, 2019
1 parent 4842ae5 commit 7027234
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions menu/plex/lsio-plex-claim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ function setPref {
sed -i -E "s/\/>/ ${key}=\"$value\"\/>/" "${prefFile}"
fi
}

PMSdir="/opt/appdata/plex/database/Library/Application Support/Plex Media Server"
prefFile="/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml"

PLEX_CLAIM="$1"

# Create empty shell pref file if it doesn't exist already
if [ ! -e "${prefFile}" ]; then
echo "Creating pref shell"
mkdir -p "${PMSdir}"
cat > "${prefFile}" <<-EOF
<?xml version="1.0" encoding="utf-8"?>
<Preferences/>
EOF
chown -R 1000:1000 "${prefFile}"
chown -R 1000:1000 "/opt/appdata/plex"
fi

# Setup Server's client identifier
Expand Down

0 comments on commit 7027234

Please sign in to comment.