Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

SOLVED Plex Media Server instlall

Message
Author
User avatar
chrisb
Forum Novice
Forum  Novice
Posts: 3
Joined: Wed Feb 14, 2018 1:09 am

Re: SOLVED Plex Media Server instlall

#11 Post by chrisb » Sat Mar 10, 2018 5:39 pm

I noticed the same. Plex update rolls back changes startup scripts. Specifically replacing the plexmediaserver script with a plexserver script that is not working. Trying to start PMS just reders webpage not responding page. Solved it by renaming /etc/init.d/plexmediaserver and /etc/plexserver to plexmediaserver.old an plexserver.old replacing it with a new /etc/init.d/plexmediaserverer file:

Code: Select all

#!/bin/sh

### BEGIN INIT INFO
# Provides:        plexmediaserver
# Required-Start:  $network $remote_fs $syslog
# Required-Stop:   $network $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:    0 6
# Short-Description: Start plexmediaserver 
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

. /lib/lsb/init-functions

DAEMON=/usr/sbin/start_pms
PIDFILE=/var/run/plexmediaserver.pid

test -x $DAEMON || exit 5

LOCKFILE=/run/lock/plexmediaserver

case $1 in
	start)
		log_daemon_msg "Starting plexmediaserver" 
		
		(
			flock -w 180 9
			start-stop-daemon --start --chuid plex:plex --exec $DAEMON &
		) 9>$LOCKFILE
		log_end_msg $?
  		;;
	stop)
		log_daemon_msg "Stopping plexmediaserver"
		pkill Plex
		log_end_msg $?
  		;;
    *)
		echo "Usage: $0 {start|stop}"
		exit 2
		;;
esac
Plex can now be started/stopped with

Code: Select all

 service plexmediaserver {start|stop}
 

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 8667
Joined: Sun Dec 16, 2007 1:17 pm

Re: SOLVED Plex Media Server instlall

#12 Post by dolphin_oracle » Sat Mar 10, 2018 9:50 pm

chrisb wrote:I noticed the same. Plex update rolls back changes startup scripts. Specifically replacing the plexmediaserver script with a plexserver script that is not working. Trying to start PMS just reders webpage not responding page. Solved it by renaming /etc/init.d/plexmediaserver and /etc/plexserver to plexmediaserver.old an plexserver.old replacing it with a new /etc/init.d/plexmediaserverer file:

Code: Select all

#!/bin/sh

### BEGIN INIT INFO
# Provides:        plexmediaserver
# Required-Start:  $network $remote_fs $syslog
# Required-Stop:   $network $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:    0 6
# Short-Description: Start plexmediaserver 
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

. /lib/lsb/init-functions

DAEMON=/usr/sbin/start_pms
PIDFILE=/var/run/plexmediaserver.pid

test -x $DAEMON || exit 5

LOCKFILE=/run/lock/plexmediaserver

case $1 in
	start)
		log_daemon_msg "Starting plexmediaserver" 
		
		(
			flock -w 180 9
			start-stop-daemon --start --chuid plex:plex --exec $DAEMON &
		) 9>$LOCKFILE
		log_end_msg $?
  		;;
	stop)
		log_daemon_msg "Stopping plexmediaserver"
		pkill Plex
		log_end_msg $?
  		;;
    *)
		echo "Usage: $0 {start|stop}"
		exit 2
		;;
esac
Plex can now be started/stopped with

Code: Select all

 service plexmediaserver {start|stop}
 
just pushed an update to the install script in mx-packageinstaller-pkglist to take care of the disappearing init script links for plex.

Its worth noting the plex doesn't support our sysvinit system. I've been attempted to shoe-horn on a sysvinit script to launch plex. The new setup should find when plex nukes the plexmediaserver symlink during updates (replacing with a link to a non-existent upstart script) and replace it on the next boot up. the link points to our "plexserver" script, which was wrong initially, but should be working now on the next update. So reinstalling from mx-packageinstaller after the update might be in order.

Or keep your own if its working for you.
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 17 32 bit (streaming media player)
lenovo ThinkPad T530 - MX-17
lenovo s21e - antiX-17, MX17(live-usb)

User avatar
chrisb
Forum Novice
Forum  Novice
Posts: 3
Joined: Wed Feb 14, 2018 1:09 am

Re: SOLVED Plex Media Server instlall

#13 Post by chrisb » Sun Mar 11, 2018 2:53 pm

Thanks dolphin_oracle I will try it.

User avatar
KBD
Forum Regular
Forum Regular
Posts: 989
Joined: Sun Jul 03, 2011 7:52 pm

Re: SOLVED Plex Media Server instlall

#14 Post by KBD » Mon Jun 04, 2018 11:35 am

Bumping this old thread:
Do I need to install systemd to avoid Plex breakage?

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 8667
Joined: Sun Dec 16, 2007 1:17 pm

Re: SOLVED Plex Media Server instlall

#15 Post by dolphin_oracle » Mon Jun 04, 2018 12:42 pm

KBD wrote:
Mon Jun 04, 2018 11:35 am
Bumping this old thread:
Do I need to install systemd to avoid Plex breakage?
I don't think so. at least, I think the current install package from MX-PackageInstaller shouldn't break on update (I hope).

and systemd is already installed.

if you install outside of MXPI, you will need to boot in systemd mode for plex service to start automatically. They don't provide a sysvinit script.
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 17 32 bit (streaming media player)
lenovo ThinkPad T530 - MX-17
lenovo s21e - antiX-17, MX17(live-usb)

User avatar
KBD
Forum Regular
Forum Regular
Posts: 989
Joined: Sun Jul 03, 2011 7:52 pm

Re: SOLVED Plex Media Server instlall

#16 Post by KBD » Mon Jun 04, 2018 12:48 pm

dolphin_oracle wrote:
Mon Jun 04, 2018 12:42 pm

I don't think so. at least, I think the current install package from MX-PackageInstaller shouldn't break on update (I hope).

and systemd is already installed.

if you install outside of MXPI, you will need to boot in systemd mode for plex service to start automatically. They don't provide a sysvinit script.
So far Plex won't launch/connect. I installed it from MX. There may be too many issues to use MX in this case. I'm used to setting it up with Xfce Mint or xubuntu and forgetting about it. Thought it was worth a shot though.

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 8667
Joined: Sun Dec 16, 2007 1:17 pm

Re: SOLVED Plex Media Server instlall

#17 Post by dolphin_oracle » Mon Jun 04, 2018 12:49 pm

you do need to reboot for it the new services to take affect/.
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 17 32 bit (streaming media player)
lenovo ThinkPad T530 - MX-17
lenovo s21e - antiX-17, MX17(live-usb)

User avatar
KBD
Forum Regular
Forum Regular
Posts: 989
Joined: Sun Jul 03, 2011 7:52 pm

Re: SOLVED Plex Media Server instlall

#18 Post by KBD » Mon Jun 04, 2018 1:00 pm

dolphin_oracle wrote:
Mon Jun 04, 2018 12:49 pm
you do need to reboot for it the new services to take affect/.
It finally connected. I'm going to give it a shot as I'd like to use MX to handle Plex.
Edit: yes, it is working well. Thanks guys!

Post Reply

Return to “Software / Configuration”