Write up to setup plex to start on boot.
To run plex automatically at start put the following in /etc/init.d/plex
pay attention to change the “path_to_plex” & “USERNAME” to the correct values for your setup!
#!/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 "/path_to_plex/start.sh" || exit 0
plex_running=<code>ps ax | grep "Plex Media Server" | awk '{ print $1 }' | wc -l</code>
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
su -l USERNAME -c 'path_to_plex/start.sh &' >/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
then run
sudo chmod 755 /etc/init.d/plex
sudo chown root:root /etc/init.d/plex
put in startup shortcuts & start the service
sudo update-rc.d plex defaults
sudo /etc/init.d/plex start
Thanks for the update, but you need to change the post to download the newer version of plex.
I’ve edited the post above to point to the new file: http://espressobin.net/forums/topic/plex/#post-530
Your awesome man that worked like a charm. No idea why I failed, but Thanks!!!
Brian,
Unfortunately no. I’m a bit baffled too since I followed the directions and confirmed the configuration files had all the options set. I even double checked the modules.builtin file and it look like iptables and netfilter were included.
Anyway if you could post a url somewhere for your kernel I’d be very appreciative.
Huh. I rebuilt the kernel with the options you had, reinstalled iptables, and I’m still getting
iptables v1.6.0: can’t initialize iptables table `filter’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
no clue.
Thank You! I’m away from the house for a few days, but I’ll defiantly give this a try when I get home.
Do you mind if I repost some of this with my additional notes in another forum, I mod the subreddit espressobin.
Thanks again!!
Found a write up that works!
Updated Plex installation instructions for Ubuntu 16.04 from espressobin
Brian,
Just one further attempt I’ve tried and again if this helps anyone figure this out I would love to know how they did it.
I tried installing the Linux-generic-headers & Linux-generic packages thinking if I could get the board to load that kernel I would have the headers I needed. They installed but even trying multiple times, I could not get the board to re-flash and use the new generic image. I tried using “aptitude –safe-upgrade” and apt and neither wanted to work.
still getting
david@espressobin/~:uname -a
Linux espressobin.localdomain 4.4.8-armada-17.02.1-gb8d7d22 #1 SMP PREEMPT Tue Feb 7 14:04:11 PST 2017 aarch64 aarch64 aarch64 GNU/Linux
Hey brian,
I’ve been working on this for a few days as well, as far as I can tell the kernel isn’t built with the iptables modules.
After some searching I’ve tried using mod_probe and the modules are not available for the kernel compiled using that guide. I’ve also tried using the pre-built kernel of the tech page, and also had no luck,
If you can figure out how to make this work, please post your solution.
THANKS!!
Sorry to reply to myself but here is the error:
[17:46 david@espressobin ~] > apt-get install curl gcc-4.9-base gcc-4.9-base:armhf libc6 libc6:armhf libcurl3 libgcc1 libgcc1:armhf
Reading package lists… Done
Building dependency tree
Reading state information… Done
libgcc1 is already the newest version (1:6.0.1-0ubuntu1).
libc6 is already the newest version (2.23-0ubuntu7).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libc6 : Breaks: libc6:armhf (!= 2.23-0ubuntu7) but 2.23-0ubuntu3 is to be installed
libc6:armhf : Breaks: libc6 (!= 2.23-0ubuntu3) but 2.23-0ubuntu7 is to be installed
E: Unable to correct problems, you have held broken packages.
Thanks!
Hello Matt!
We are on the same path it seems, here is the install that finally worked for me after many hours.
put the lan cable in the LEFT port (lan1)
use nano or vim to edit /etc/network/interfaces
auto eth0
iface eth0 inet manual
auto lo
iface lo inet loopback
auto lan1
iface lan1 inet static
address 192.168.1.124
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.1.1
dns-nameservers 192.168.1.124 8.8.8.8
pre-up /sbin/ifconfig lan1 up
Like the poster above said the pre-up takes care of getting eth0 up first, the rest is knowing lan1 is the left port! Love the documentation huh?
Edit; I haven’t tried but I assume if you substitute lan1 for wan in the above you can put the cable in the RIGHT lan port and it should work.
Good Luck!
No problem, in after thought try posting a general question on http://www.unix.com/
Not many microcomputer users but I’ve gotten help from that forum before they are a pretty knowledgeable group.
Matt,
I’m sorry that one is beyond me as a Linux is only a hobby. Hopefully someone with some more nix experience can chime in to help.
Good luck
@mdframe as far as I could tell there isn’t a operating system on a flash memory drive. I pulled my card and that was the same error I received. The plug didn’t boot without the card so I assume it’s not like the sheevaplug and has none.
Well shit. Thanks for the reply but I gave up yesterday and went ahead and put ubuntu on the boot on the drive. Did not realize you could use an extracted version of the kernel, took me all day to get those stupid files.
Hint for anyone if your going to compile use the same operating system you intend on running. I did it the first time on my Sheeva plug it was so slow, and ended up not working because I run Debian on it. Took someone’s advice and rented a droplet server for $10 for the hour I was done in a third the time Second time around.
Technical specification tables can not be displayed on mobile. Please view on desktop