Skip to content

Instantly share code, notes, and snippets.

@maciekish
Last active May 1, 2018 10:20
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 maciekish/a6e3dc65523c2b25ff312b8f7689fd1c to your computer and use it in GitHub Desktop.
Save maciekish/a6e3dc65523c2b25ff312b8f7689fd1c to your computer and use it in GitHub Desktop.
Qnap Plex Updater
pkg=${pkg/\/share/""}#!/bin/bash
# crontab -e as admin on Qnap.
# https://gist.github.com/maciekish/a6e3dc65523c2b25ff312b8f7689fd1c/
pkg=$(find /share/Media/plexmediaserver* | head -n 1)
localpkg=${pkg/\/share/""}
docker=$(which docker)
if [ -f "$pkg" ]
then
echo $(file $pkg)
upgrade="$docker exec -t plex dpkg -i $localpkg"
restart="$docker restart plex"
eval $upgrade
$(rm -rf $pkg)
eval $restart
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment