Last active
May 1, 2018 10:20
-
-
Save maciekish/a6e3dc65523c2b25ff312b8f7689fd1c to your computer and use it in GitHub Desktop.
Qnap Plex Updater
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
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