Jump to content

Server Update - Stop Systemd script overwrite


Recommended Posts

88fingerslukee
Posted

I run Emby as a non-default user on Fedora 21 x86_64.  I have updated my systemd script and changed the ownership/group of the /var/opt/MediaBrowser/ and /opt/MediaBrowser/ directories.

 

My problem is that after an update, the script is overwritten and the ownership on the directories is reverted. Is there anyway to change the package to not do this? I know that most packages detect a changed config script and save the new file as same.file.rpmsave.

 

Thoughts?

 

Thanks for all the hard work and prompt forum replies. It's very appreciated!!

 

 

thefirstofthe300
Posted

As long as the rpm isn't placing the systems script in /etc, you can copy the systemd script to /etc/systemd/system and systemd will use the systemd in /etc instead of the packages systemd script.

Posted (edited)

For now the best way would be to create a copy of the systemd file with your settings int the same directory with a different name,

second either create

 /etc/opt/MediaBrowser/MediaBrowserServer/MediaBrowserServer.cfg

with the following line

program_data_path="/var/opt/MediaBrowser/MediaBrowserServer"

 

substitute the path with one not under /var/opt/MediaBrowser

 

or make the user which runs the server part of the media group.

Edited by jose
  • 2 weeks later...
Jackrats
Posted

I believe that the install should be changed to not put the unit file into /etc/systemd/system but rather to place it in /usr/lib/systemd/system. This is the default system location (at least on CentOS 7). The /etc/systemd/system is meant for customized versions. If it were moved in the package to the /usr/lib location, it would not overwrite customized changes.

  • Like 1
  • 2 weeks later...
Jackrats
Posted

Jose, any chance of moving the systemd script to /usr/lib/systemd/system? I like to edit mine to Restart = Always and it gets overwritten on every update.

 

Also, just wondering if there might be a new Emby or MediabrowserServer RPM package built soon for 3.0.5607. I was looking at making my own RPM based on your source RPM, but it's not clear to me how the SOURCES/3.0.xxxx.y.tar.gz file gets build from the Mono package. Any hints on that?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...