Jump to content

Server Update - Stop Systemd script overwrite


88fingerslukee

Recommended Posts

88fingerslukee

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!!

 

 

Link to comment
Share on other sites

thefirstofthe300

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...
Jackrats

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
Link to comment
Share on other sites

  • 2 weeks later...
Jackrats

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?

Link to comment
Share on other sites

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...