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

George Galt george.galt at gmail.com
Tue May 15 13:29:43 UTC 2012


On Tue, May 15, 2012 at 9:00 AM, Richard Shaw <hobbes1069 at gmail.com> wrote:
> Just a reminder... You don't need a PID file if you run Type=simple...
> It really is easier!
>
> Richard
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

Thanks everyone.  I've got it working.

Here is the file I ended up with:

###################################################
# file located at /lib/systemd/system/mythbackend.service
# use "systemctl enable mythtbackend.service to load
# based on a template from RPMFusion and R.G. Newbury from this thread:
# http://www.gossamer-threads.com/lists/mythtv/users/516650?search_string=mythbackend.service%20;#516650

[Unit]
Description=MythTV backend service

After=network.target mysqld.service
# for mythweb: not necessary so 'wants' not 'after'
Wants=httpd.service

[Service]
Type=simple


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

# NOTE: if you have other switches you want, insert them below.  This
is set to use log files in
# /var/log/mythtv.  Make sure that the location of the HOME/MYTHCONFIG
files, logs and the pid file
# are writeable by the user designated above.
ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv

[Install]
WantedBy=multi-user.target


More information about the mythtv-users mailing list