[mythtv-users] Systemd File For MythTV on Fedora Questions
Harry Orenstein
holists at verizon.net
Mon May 14 23:42:48 UTC 2012
On Mon, 2012-05-14 at 09:51 -0500, Richard Shaw wrote:
> On Mon, May 14, 2012 at 9:40 AM, George Galt <george.galt at gmail.com> wrote:
<snip>
>
> It has not been necessary to run mythbackend as root for quite some
> time. Just make sure the mythtv user is in the audio and video groups
> for access to those devices.
>
> It shouldn't be necessary to change permissions on the physical
> database since mythtv logs in through the server interface.
> Additionally, you don't need to worry about the PID file if you use
> Type=simple, see below.
>
>
<snip>
>
> If you use "Type=simple" then you need to drop the --daemon options.
> Simple is preferred over forking in systemd. Basically systemd picks
> up the PID when it starts the backend. If you use --daemon then
> mythbackend forks so then you have to use a PID file.
>
>
> > Environment=MYTHTV_HOME=/var/lib/mythtv
> > Environment=MYTHCONFDIR=/var/lib/mythtv
> > Environment=HOME=/var/lib/mythtv
> > # NOTE: using the "mythtv" user, NOT root.
> > User=mythtv
> > EnvironmentFile=/etc/sysconfig/mythbackend
>
> Using both the Environment and EnvironmentFile options is redundant.
> EnvrionmentFile is more for backwards compatibility, so drop that in
> favor of Environment.
>
>
> > ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv
> > --pidfile /var/log/mythtv/mythbackend.pid
>
> To use Type=simple, drop the --daemon and --pidfile options.
>
> Richard
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
Richard,
This is related to this topic, so I hope you don't mind a little
thread-jacking :)
It seems you wrote the rpm packaging mods to support systemd. I tried
modifying build_myth.sh to enable systemd (adding --with systemd) and
got this error when mythtv.spec is built:
error: syntax error in expression
error: /home/mythtv/mythtv/0.25-fixes/packaging/rpm/mythtv.spec:159:
parseExpressionBoolean returns -1
This is the first instance of "%if %{with_systemd}" and I cannot figure
out how to address the error short of commenting out all of the "then"
clauses (so that systemd is the default for compile). I'm running
Fedora 16 (if that makes a difference). I cannot see how a value of -1
gets set if 0 and 1 are the only defined values (in the %define).
Any help would be greatly appreciated. TIA!
-- Harry O.
More information about the mythtv-users
mailing list