Giter Club home page Giter Club logo

plexupdate's Introduction

plexupdate

Plex Update is a BASH script which simplifies the life of headless Linux Plex Media Server users (how's that for a strange description).

This tool will automatically download the latest version for linux (be it plexpass or public version) and if you ask it to, install it for you.

installation

It's fairly easy, but let's take it step by step (if it seems too much, skip to the end for a short version)

1. getting the code

You can either just download it as a zip file and unzip it on your server, or you can use git to clone it ( git clone https://github.com/mrworf/plexupdate.git ). The main benefit with git clone is that you can update to latest version very easily.

2. setting it up

plexupdate.sh looks for a file named .plexupdate located in your home directory. Please note that I'm referring to the home directory of the user who is running the plexupdate.sh ... If that user is someone else (root for instance) you'll need to make sure that user has the config file set up properly as well.

The contents of this file usually is

[email protected]
PASS="my-secret-plex-password"
DOWNLOADDIR=/a/folder/to/save/the/files/in

Obviously you need to change these three so they match your account information. And if you don't put anything as a DOWNLOADDIR, the tool will use the folder you're executing the script from. So take care.

3. advanced options

There are a few other options for the more enterprising user. Setting any of these to yes will enable the function.

  • AUTOUPDATE Makes plexupdate.sh automatically update itself using git. Note! This will fail if git isn't available on the command line.
  • AUTOINSTALL Automatically installs the newly downloaded version. Currently works for debian based systems as well as rpm based distros. Will fail miserably if you're not root.
  • AUTODELETE Once successfully downloaded and installed, it will delete the package (want not, waste not? ;-))
  • PUBLIC The default behavior of plexupdate.sh is to download the PlexPass edition of Plex Media Center. Setting this option to yes will make it download the public version instead. If this is yes, then EMAIL and PASS is no longer needed.
  • FORCE Normally plexupdate.sh will avoid downloading a file it already has or if it's the same as the installed version, but this allows you to override.
  • PRINT_URL Authenticate, fetch the download URL, print it, and then exit.
  • REDHAT_INSTALL The commandline used to install .rpm packages, only change if you need special options
  • DEBIAN_INSTALL The commandline used to install .deb packages, only change if you need special options

Most of these options can be specified on the command-line as well, this is just a more convenient way of doing it if you're scripting it. Which brings us to...

4. command-line

I'm going to be lazy, just run the tool with -h and you'll find out what you can do. It will basically be a mirror of what section 3 just stated :-)

running it

It's very simple, just execute the tool once configured. It will complain if you've forgotten to set it up. If you want to use the autoinstall (-a option or AUTOINSTALL=YES is set), you must run as root or use sudo when executing or plexupdate.sh will stop and give you an error.

Overall it tries to give you hints regarding why it isn't doing what you expected it to.

trivia

  • "kaka" is swedish for "cookie"

TL;DR

Open a terminal or SSH on the server running Plex Media Center

wget https://raw.githubusercontent.com/mrworf/plexupdate/master/plexupdate.sh
chmod +x plexupdate.sh
echo -e > ~/.plexupdate 'EMAIL=<plex email account>\nPASS="<plex password>"'
nano -w ~/.plexupdate
sudo ./plexupdate.sh -a

FAQ

My password is rejected even though correct

If you use certain characters, such as dollar sign, in your password, bash will interpret that as a reference to a variable. To resolve this, enclose your password with single quotes instead of the normal quotes.

Ie, PASS="MyP4$$w0rD" will not work, but changing to it to PASS='MyP4$$w0rD' will

plexupdate's People

Contributors

mrworf avatar xombiemp avatar ajmiller82 avatar demonbane avatar diedthreetimes avatar abealsaleh avatar altonv avatar gboudreau avatar apocrathia avatar markglenn avatar mpwdawson avatar darrin0101 avatar joemiller avatar martijndierckx avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.