[mythtv-users] Systemd File For MythTV on Fedora Questions

R. G. Newbury newbury at mandamus.org
Mon May 14 15:15:20 UTC 2012


On 05/14/2012 10:40 AM, George Galt wrote:
> All:
>
> I've been working on a .service script for the mythbackend on systemd
> for my Fedora 16 x86_64 backend, which is installed using Axel's
> ATrpms repositories.  The script so far is below and owes a lot to the
> discussion last week.  Currently, this file works for me.
>
> I've got a few questions that I'm hoping someone can answer:
>
> 1)  Permissions.  The script below runs the backend as user "mythtv"
> rather than "root".  I've set permissions for the directories
> containing the recordings/videos, coverart (etc), logs, database
> backup, and pid file to user=mythtv, but is there anything else that I
> might be missing or anything that I should look out for?  So far, this
> seems to work, but if there is something that is run infrequently I
> might not have seen it yet.
>
> 2)  service type.  The RPMfusion script and the script on the mythtv
> wiki designate the service as "type=simple".  RG Newbury's version
> (from last week's discussion) used "type=forking".  I find that if I
> try to use "type=simple" the startup fails with "systemd[1]:
> mythbackend.service stopping timed out. Killing." in
> /var/log/messages.  Does anyone know why this might be?  I find the
> description here:
> http://fedoraproject.org/wiki/Packaging:Systemd#.5BService.5D to be
> unhelpful.

1) I think you have covered all of the places which need to be chown'd. 
I cannot think of any other spots.

2) I could never get type=simple to work. I had exactly your experience. 
I think that simple disallows any ExecStartPre invocations. And since 
there are permissions issues etc. I followed the example of the mysql 
which runs both Pre and Post scripts to ensure that things "just work" 
(the heavy lifting having been done behind the scenes.)

As to not using /var/run or /run, I found that the required folders were 
*sometimes* not created (eg /var/run/mythtv), leading, of course to a 
rather well disguised startup failure. Why, I have no idea. Systemd 
*should* do that, but ofttimes would not. So pidfile=/var/log/mythtv 
which will exist.

And as you say, the 'help' is not very.

Geoff






More information about the mythtv-users mailing list