Last active
May 26, 2023 17:13
-
-
Save highercomve/0d6834c0a26ca12fbbb6ec251e915901 to your computer and use it in GitHub Desktop.
Install plex on linux
This file contains 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 | |
set -e | |
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" | |
PLEX_ARCH="arm64" | |
echo "Searching for latest version of plex" | |
if [ -z ${PLEX_RELEASE+x} ]; then \ | |
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \ | |
| jq -r '.computer.Linux.version'); | |
fi | |
echo | |
echo "You have plex installed with this version" | |
dpkg -l | grep plexmediaserver | |
echo | |
echo "Do you what to download amd install $PLEX_RELEASE [yes/y]" | |
read download | |
if [ "$download" != "yes" ] && [ "$download" != y ]; then | |
exit 0 | |
fi | |
echo | |
touch /tmp/plexmediaserver.deb | |
curl -o \ | |
/tmp/plexmediaserver.deb -L \ | |
"${PLEX_DOWNLOAD}/${PLEX_RELEASE}/debian/plexmediaserver_${PLEX_RELEASE}_${PLEX_ARCH}.deb" | |
# sudo apt install /tmp/plexmediaserver.deb | |
sudo dpkg --install /tmp/plexmediaserver.deb | |
sudo rm -rf /tmp/plexmediaserver.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment