Skip to content

Instantly share code, notes, and snippets.

@mydnic
Created July 27, 2018 12:04
Show Gist options
  • Save mydnic/f235407754a50967b710d6f9354f464e to your computer and use it in GitHub Desktop.
Save mydnic/f235407754a50967b710d6f9354f464e to your computer and use it in GitHub Desktop.
Bash script to update Plex Media Server on Linux 64bit
#!/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