Description of problem: The mediatomb startup script in /lib/systemd/system/mediatomb.service hardcodes all the values instead of reading them from /etc/mediatomb.conf Version-Release number of selected component (if applicable): 0.12.1-fc16.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install mediatomb 2. Look at /lib/systemd/system/mediatomb.service 3. Actual results: Port, interface, home directory, etc are hardcoded Expected results: Items should be loaded with: EnvironmentFile=-/etc/mediatomb.conf and referred to like ${MT_INTERFACE} Additional info:
This issue still applies to mediatomb-0.12.1-16.fc17.x86_64. The file /etc/mediatomb.conf is included in the RPM which misleading because it's not actually used.
Created attachment 596669 [details] mediatomb unit that uses the environment file Since mediatomb.conf is not stored under /etc/sysconfig/ directory I decide to submit unit file that uses the environment file which arguably is not needed since user can just copy the medatomb.service to /etc/systemd/systemd directory and adjust the parameters there.. In anycase to test this just copy/save this file under /etc/systemd/system directory and run systemctl daemon-reload and stop/start the service...
(In reply to comment #2) > Created attachment 596669 [details] > mediatomb unit that uses the environment file > > Since mediatomb.conf is not stored under /etc/sysconfig/ directory I decide > to submit unit file that uses the environment file which arguably is not > needed since user can just copy the medatomb.service to /etc/systemd/systemd > directory and adjust the parameters there.. Yes it is arguable whether it's needed or not, but the configuration file shouldn't be there if one is expected to copy and edit the service file or at least it could contain a note saying I'm now deprecated. > In anycase to test this just copy/save this file under /etc/systemd/system > directory and run systemctl daemon-reload and stop/start the service... I have copied the mediatomb.service file to /etc/systemd/system and it works as expected. Thanks you very much.
Well, actually /etc/mediatomb.conf is still respected, but since command line options (which is hardcoded in mediatomb.service) have higher priority, thus option in mediatome is shadowed. Mind removing the hardcoded options? :-)
Created attachment 626613 [details] mediatomb unit that uses the environment 2 A slight improvement on the other unit file which uses a specified PID file rather than the one from the config.
mediatomb-0.12.1-20.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/mediatomb-0.12.1-20.fc18
Package mediatomb-0.12.1-20.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mediatomb-0.12.1-20.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-17263/mediatomb-0.12.1-20.fc18 then log in and leave karma (feedback).
mediatomb-0.12.1-20.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.