[mythtv-users] How to start MythTV Backend?
James Linder
jam at tigger.ws
Tue Nov 19 23:59:02 UTC 2013
On 20/11/2013, at 6:44 AM, mythtv-users-request at mythtv.org wrote:
>>
>> Hi Paul,
>>
>> You're right, firmware was missing.
>> In "Capture Card Setup", the field DVB device is now filled with "/dev/dvb/adapter0/frontend0",
>> but in FrontendID, I still have an error:
>> "Could not get card ... [] Subtype: Unknown error".
>>
>> -- Damian --
>
> Now I'm moving outside my area of expertise... Looking at
>
> http://www.mythtvtalk.com/help-failing-get-mythtv-up-running-15031/
>
> (which is worth a read), it *might* be a permissions problem on the /dev/dvb ... directories. The solution in the case above was to add mythtv to the video group.
If anybody can give me words of wisdom here I'd appreciate it lots:
I've written (well gotten) systemd startup for myth (later I show it does work)
I've ordered my script to be last in the boot sequence
At boot time myth startup fails because the firmware has not yet loaded.
If I logon to a newly booted backend and
systemctl start mythbackend.service
everything runs sweetly.
How do I delay my boot start until the firmware has loaded?
James
PS
mythbackend.service
------------------------------------------------------------------------------------------------------------------
[Unit]
Description=MythTV backend service
After=network.target mysqld.service
# Uncomment the following line if you will be using the mythweb plugin on the
# same system as mythbackend.
#Wants=httpd.service
[Service]
# You have 2 choices for 'Type': simple or forking
# These require ExecStart lines which are NOT interchangeable.
# Type=simple is recommended.
# If using 'Type=simple'
# 1) you cannot have --daemon in the command line
# If using 'Type=forking'
# 1) you must have --daemon in the command line AND
# 2) you must have --pidfile /somewhere in the command line AND
# 3) you must have a line PIDFILE=/somewhere in the [service] stanza
# this lets systemd know how to find the forked process PID,
# otherwise it presumes the starting process will be the remaining process
# (cf. with the mysqld_safe process which starts mysqld and then disappears).
# Specifying a pidfile with Type simple does not cause any problems and
# may help in debugging startup failures.
#Type=forking
Type=simple
Environment=MYTHCONFDIR=/etc/mythtv
# Default setting assumes a system wide install. Otherwise it should be set to
# the folder containing the .mythtv subfolder containing the config.xml file
# Such as
#Environment=HOME=/usr/share/mythtv
# or
#Environment=HOME=/~/.mythtv
# systemd changes execution from the calling user (possibly root) to this user
# if you have permissions problems or obscure errors try logging in as mythtv
# See notes below
User=mythtv
# Uncomment one of the following...
# Use sysloging rather than separate logging:
#ExecStart=/usr/bin/mythbackend --syslog local7
# If Type=forking you must specify the --daemon and --pidfile options:
#ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv --loglevel crit --pidfile /run/mythtv/mythbackend.pid
#PIDFILE=/run/mythtv/mythbackend.pid
# Systemd sends stdout to syslog, and mythbackend has console logging enabled without --daemon.
# Send stdout to /dev/null so console logging doesn't go to syslog
StandardOutput=null
# Default setting for Type=simple.
ExecStart=/usr/bin/mythbackend --logpath /store/mythlogs --loglevel crit
# Whether systemd will continue over-watch and restart on any halt
#Restart=Restart-always
[Install]
WantedBy=multi-user.target
More information about the mythtv-users
mailing list