Created
July 27, 2018 12:04
-
-
Save mydnic/f235407754a50967b710d6f9354f464e to your computer and use it in GitHub Desktop.
Bash script to update Plex Media Server on Linux 64bit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get Plex Latest Package URL | |
packageUrl=$(curl -s 'https://plex.tv/api/downloads/1.json' | jq -r '.computer.Linux.releases[0].url') | |
echo "Latest Package Url: $packageUrl" | |
# Get the filename | |
fileName=$(basename $packageUrl) | |
echo "Filename: $fileName" | |
# Download | |
wget $packageUrl | |
# Install | |
sudo dpkg -i $fileName | |
# Remove file | |
rm $fileName | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment