Systemd unit file: Can/Should ExecStart and ExecStop run a script?

Tom Hughes tom at
Wed Oct 19 20:58:50 UTC 2011

On 19/10/11 21:48, Richard Shaw wrote:
> On Wed, Oct 19, 2011 at 3:26 PM, Lennart Poettering
> <mzerqung at>  wrote:
>> You should manage acess control of device nodes from udev rules. That's
>> the only reasonably safe way to handle these things. And this should not
>> be mentioned at all in systemd unit files.
> Well, that's a bit beyond me at this point. I'm not sure that anyone
> using MythTV from RPM Fusion is even choosing to run mythbackend as
> anyone other than root. Perhaps for the time being I won't give them a
> choice.

Count me as one person that does... The systemd unit I'm using at the 
moment (with F15) is:

Description=MythTV Backend

ExecStartPre=/usr/bin/setfacl -m u:mythtv:rwx -R /dev/dvb
ExecStart=/usr/bin/mythbackend --user mythtv --logfile 
/var/log/mythtv/mythbackend.log --pidfile /var/run/
ExecStopPost=/usr/bin/setfacl -x u:mythtv -R /dev/dvb



Tom Hughes (tom at

More information about the devel mailing list