Quantcast
Channel: Recent Discussions — Plex Forums
Viewing all articles
Browse latest Browse all 151235

Plex Media Server for Debian

$
0
0
UPDATED 28 April 2016
New key for the server please update by
sudo curl http://shell.ninthgate.se/packages/shell.ninthgate.se.gpg.key | sudo apt-key add -

I have also removed the squeeze repo. (NOTE it still works on squeeze but change squeeze for wheezy in /etc/apt/source.list.d/plexmediaserver.list

Another thing I have added to the repo is Jessie (IF JESSIE IS RUNNING SYSTEMD).
This is just the ordinary Ubuntu package provided by PLEX.



Origninal modified post --->
Plex Media Server Repo for Debian

Hi.
We have decided to lock the other Debian thread and start a new one so I can edit the first post since Origin is no longer and has not been maintaing this package for a while.

All credits goes to Tobias and the other at Plex for PMS and the init script for Debian were made by Origin. I have just taken all there work and efforts and repacked it for Debian since the ubuntu package is not compatible since the change to upstart.

Down here is the instructions for installing PMS from my repo. This packages is for now compatible with Debian Squeeze , Wheezy and OpenMediaVault 0.3 , 0.4

First Time install

sudo apt-get install curl

If you are running Squeeze,Wheezy or Jessie with SYSVINIT
echo "deb http://shell.ninthgate.se/packages/debian wheezy main" | sudo tee -a /etc/apt/sources.list.d/plexmediaserver.list

if you are running Jessie with systemd
echo "deb http://shell.ninthgate.se/packages/debian jessie main" | sudo tee -a /etc/apt/sources.list.d/plexmediaserver.list
sudo curl http://shell.ninthgate.se/packages/shell.ninthgate.se.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install plexmediaserver


Upgrading

sudo apt-get update
sudo apt-get upgrade



The init script Original by Origin with a minor modification by me

#!/bin/sh
### BEGIN INIT INFO
# Provides:          plexmediaserver
# Required-Start:    $remote_fs $syslog $networking
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Plex Media Server
# Description:       Plex Media Server for Linux,
#                    More information at http://www.plexapp.com
#                    Many thanks to the great PlexApp team for their wonderfull job !
# Author:            Cedric Quillevere / origin@killy.net
# Rewamped           Christian Svedin / christian.svedin@gmail.com
# Version:           1.2
### END INIT INFO
 
# Read configuration variable file if it is present
[ -r /etc/default/plexmediaserver ] && . /etc/default/plexmediaserver
 
test -f "/usr/lib/plexmediaserver/start.sh" || exit 0
 
plex_running=`ps ax | grep "\./Plex Media Server" | awk '{ print $1 }' | wc -l`
 
case "$1" in
    start)
        if [ "$plex_running" -gt 1 ]; then
                echo "Plex already running..."
                exit 0
        fi
        echo -n "Starting Plex Media Server: "
        su -l $PLEX_MEDIA_SERVER_USER -c "/usr/sbin/start_pms &" >/dev/null 2>&1
        sleep 1
        echo "done"
        ;;
    stop)
        if [ "$plex_running" -eq 1 ]; then
                echo "Plex Media Server is not running (no process found)..."
                exit 0
        fi
        echo -n "Killing Plex Media Server: "
        # Trying to kill the Plex Media Server itself but also the Plug-ins
        ps ax | grep "Plex Media Server" | awk '{ print $1 }' | xargs kill -9 >/dev/null 2>&1
        ps ax | grep "Plex DLNA Server" | awk '{ print $1 }' | xargs kill -9 >/dev/null 2>&1
        sleep 1
        echo "done"
        ;;
    restart)
        sh $0 stop
        sh $0 start
        ;;
    status)
        if [ "$plex_running" -gt 1 ]; then
                echo "Plex Media Server process running."
        else
                echo "It seems that Plex Media Server isn't running (no process found)."
        fi
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
        ;;
esac
 
exit 0
 

Viewing all articles
Browse latest Browse all 151235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>