Skip to content

Instantly share code, notes, and snippets.

@bumbummen99
Last active January 27, 2023 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumbummen99/0d6fb1ac246198b287591175c3ac6ab3 to your computer and use it in GitHub Desktop.
Save bumbummen99/0d6fb1ac246198b287591175c3ac6ab3 to your computer and use it in GitHub Desktop.
Script to install/update emby
#!/usr/bin/env bash
# Create TMP directory
TMP=$(mktemp -d)
# Get emby server deb package from the latest release files
LATEST=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | jq '.assets[] | select(.name|match("emby-server-deb.*_amd64.deb$")) | .browser_download_url' | tr -d '"')
echo "Found latest release .deb package at: $LATEST"
# Download emby server deb pacakge to TMP
wget -O $TMP/emby-server.deb $LATEST
if [ ! -f "$TMP/emby-server.deb"]; then
echo "Could not download latest .deb package!"
exit 1
fi
# Install/update emby server deb package
echo "Installing emby-server..."
sudo apt install -y $TMP/emby-server.deb
echo "Successfully installed latest emby-server!"
# Remove TMP directory
rm -R $TMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment