[mythtv-users] starting with systemd was Who's running Myth on Arch, and what do you think? (Gary Buhrmaster)

Yianni yiannividalis at hotmail.com
Sun Nov 24 09:28:49 UTC 2013


I home this gets attached to the proper thread, but I'm not sure, since stg must be wrong with the posts I (don't) receive from this list.

I'm using openSUSE 12.3, and this is my mythbackend.service file. It's been working flawlessly for some time now. I hope it helps. Make sure you have a HOME variable.
If you change your file, you have to run as root: # systemctl daemon-reload 
for udev to re-read the configuration files.

###################################################
# file located at /etc/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?se[..]

[Unit]
Description=MythTV backend service

After=network.target mysql.service
After=dev-dvb-adapter0-frontend0.device
# for mythweb: not necessary so we put 'wants' not 'after'
#Wants=httpd.service
# On openSUSE, it's 'apache2', not 'httpd' service
Wants=apache2.service
# Try to wait until the DVB-T adapter is present.
# for this to work a udev.rules file has to be created. I'm calling mine 11-mythbackend.rules
Wants=dev-dvb-adapter0-frontend0.device

[Service]
Type=simple
# For the rare crashes, the service will restart automatically. Cool?
Restart=on-failure

# The HOME environment variable is necessary for mythbackend to find it's configuration files.
Environment=HOME=/home/yianni
# Making sure that it runs with proper locale settings.
Environment=LANG=el_GR.UTF-8
Environment=LC_CTYPE=el_GR.UTF-8
Environment=LC_NUMERIC=el_GR.UTF-8
Environment=LC_TIME=el_GR.UTF-8
Environment=LC_COLLATE=el_GR.UTF-8
Environment=LC_MONETARY=el_GR.UTF-8
Environment=LC_MESSAGES=el_GR.UTF-8
Environment=LC_PAPER=el_GR.UTF-8
Environment=LC_NAME=el_GR.UTF-8
Environment=LC_ADDRESS=el_GR.UTF-8
Environment=LC_TELEPHONE=el_GR.UTF-8
Environment=LC_MEASUREMENT=el_GR.UTF-8
Environment=LC_IDENTIFICATION=el_GR.UTF-8
Environment=LC_ALL=el_GR.UTF-8
Environment=MYTHBACKEND_OPTIONS=--nodblog --loglevel warning --syslog local7
# NOTE: using the "yianni" user, NOT root.
User=yianni

# 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.
ExecStartPre=/sbin/modprobe snd_pcm_oss
#ExecStartPre=/sbin/modprobe smsdvb

ExecStart=/usr/bin/mythbackend --loglevel warning --syslog local7
ExecStartPost=/usr/bin/sudo /usr/bin/chown -R yianni:users /var/log/mythtv

[Install]
WantedBy=multi-user.target
####################################

File: /etc/udev/rules.d/11-mythbackend.rules
#
# Create systemd device units for capture devices
# Then you have to either reboot or enter as root: # udevadm control --reload
SUBSYSTEM=="video4linux", TAG+="systemd"
SUBSYSTEM=="dvb", TAG+="systemd"
####################################



Yianni.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20131124/b63fdd34/attachment.html>


More information about the mythtv-users mailing list