[Not Solved]
Aug 11, 2015, 10:11 AM
(This post was last modified: Aug 11, 2015, 10:18 AM by RDonovan.)
Hi, I was asking this question into the comments but since the forum opened, I'm reporting it here, in the meantime I've sorted the things out by myself but I hope this could be useful and I would also like some kind of confirmation that I've done all correctly. I can't define myself a Linux newbie but neither an expert
So the thing is that I'm slowly upgrading my perfectly working Banana Pi with Bananian Wheezy to Jessie. Since I've done some mess on Wheezy, I have started with a clean Bananian Jessie on another partition and one by one I'm installing the softwares I need which are:
- Plex Media Server
- Sickrage
- Couchpotato
My problem was PMS init.d script didn't work, I've checked folder permissions, plex user permission an group and all was ok, Plex Media Server started with the ./start_pms and ./start.sh scripts but never at system boot or just typing
So I read around Plex forums and Ubuntu forums and I found out that with Jessie I need a systemd script to run PMS as service, here what I found and did:
- created the file service systemd init file
- copied this systemd script inside and adjusted the group, user and paths
- Made it executable with
- enabled it for start at boot with
Now PMS works correctly starting at boot time, I can also use again:
I still have few questions though:
- I'm not familiar with systemd, do I need to do something else to improve the init script?
- Can't obtain the echo lines during service start and stop as I did with the old init.d script on Wheezy, I know is silly but I liked them and I found them quite useful, For instance I can't see those lines netiher for sickrage or couchpotato which are still working correctly with the init.d scripts. Is there a fix for this?
- PMS is much slower to shut down compared with my old installation on Wheezy which is still at a previous version and still uses init.d script. The Library folder is exactly the same. Is there a way to improve this?
- Am I going to screw this settings up installing PMS updates from dev2day repo?
- I'm used to build my Plex Pass channel PMS package following the great HTPCGuides guide, is there the chance that I'm going to mess up my settings following that guide on Jessie?
Thanks to all, expecting great things from this forum, honored to be one of the first
So the thing is that I'm slowly upgrading my perfectly working Banana Pi with Bananian Wheezy to Jessie. Since I've done some mess on Wheezy, I have started with a clean Bananian Jessie on another partition and one by one I'm installing the softwares I need which are:
- Plex Media Server
- Sickrage
- Couchpotato
My problem was PMS init.d script didn't work, I've checked folder permissions, plex user permission an group and all was ok, Plex Media Server started with the ./start_pms and ./start.sh scripts but never at system boot or just typing
Code:
sudo service plexmediaserver start
So I read around Plex forums and Ubuntu forums and I found out that with Jessie I need a systemd script to run PMS as service, here what I found and did:
- created the file service systemd init file
Code:
sudo nano /etc/systemd/system/plexmediaserver.service
- copied this systemd script inside and adjusted the group, user and paths
Code:
[Unit]
Description=Plex Media Server for Linux
After=network.target
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/opt/plexmediaserver/Library/Application Support"
Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
Environment=PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
Environment=PLEX_MEDIA_SERVER_TMPDIR=/tmp
Environment=LD_LIBRARY_PATH=/usr/lib/plexmediaserver
Environment=LC_ALL=en_US.UTF-8
Environment=LANG=en_US.UTF-8
ExecStartPre=/bin/sh -c '/usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"'
ExecStart=/bin/sh -c '/usr/lib/plexmediaserver/Plex\ Media\ Server'
Type=simple
User=plex
Group=users
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
- Made it executable with
Code:
sudo chmod +x /etc/systemd/system/plexmediaserver.service
- enabled it for start at boot with
Code:
sudo systemctl enable plexmediaserver.service
Now PMS works correctly starting at boot time, I can also use again:
Code:
sudo service plexmediaserver start | stop | status
I still have few questions though:
- I'm not familiar with systemd, do I need to do something else to improve the init script?
- Can't obtain the echo lines during service start and stop as I did with the old init.d script on Wheezy, I know is silly but I liked them and I found them quite useful, For instance I can't see those lines netiher for sickrage or couchpotato which are still working correctly with the init.d scripts. Is there a fix for this?
- PMS is much slower to shut down compared with my old installation on Wheezy which is still at a previous version and still uses init.d script. The Library folder is exactly the same. Is there a way to improve this?
- Am I going to screw this settings up installing PMS updates from dev2day repo?
- I'm used to build my Plex Pass channel PMS package following the great HTPCGuides guide, is there the chance that I'm going to mess up my settings following that guide on Jessie?
Thanks to all, expecting great things from this forum, honored to be one of the first