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

Ian Barton lists at wilkesley.net
Mon Nov 25 14:35:59 UTC 2013


On 24/11/13 04:51, Bill Meek wrote:
> On 11/23/2013 10:26 PM, James Linder wrote:
>> I still cannot start mythbackend at boot, and as Gary suggested I did
>> read the systemd wiki.
>> Any other suggestions?
>> Thanks
>>
>> ----------------------------------------------------------------------
>> boot then check status
>> ----------------------------------------------------------------------
>> [sandypit] /home/jam [51]% sh mythstatus
>> mythbackend.service - MythTV backend service
>>       Loaded: loaded (/etc/systemd/system/mythbackend.service; enabled)
>>       Active: failed (Result: exit-code) since Sun, 2013-11-24
>> 12:02:25 WST; 1min 15s ago
>>      Process: 1040 ExecStart=/usr/local/bin/mythbackend --logpath
>> /store/mythlogs --loglevel crit (code=exited, status=130)
>>       CGroup: name=systemd:/system/mythbackend.service
>>
>>
>> ----------------------------------------------------------------------
>> start myth after boot
>> ----------------------------------------------------------------------
>> sandypit:/home/jam # sh mythstart
>> sandypit:/home/jam # exit
>>
>> [sandypit] /home/jam [53]% sh mythstatus
>> mythbackend.service - MythTV backend service
>>       Loaded: loaded (/etc/systemd/system/mythbackend.service; enabled)
>>       Active: active (running) since Sun, 2013-11-24 12:04:18 WST; 8s ago
>>     Main PID: 2348 (mythbackend)
>>       CGroup: name=systemd:/system/mythbackend.service
>>           ��� 2348 /usr/local/bin/mythbackend --logpath
>> /store/mythlogs --loglevel crit
>>           ��� 2367 /usr/local/bin/mythlogserver --daemon --verbose
>> general --logpath /sto...
>>
>> -----------------------------------------------------------------------
>> are the devices there
>> -----------------------------------------------------------------------
>> [sandypit] /home/jam [54]% ls /dev/dvb/adapter0
>> demux0  dvr0  frontend0  net0
>>
>> ------------------------------------------------------------------------
>> what does the service start file say
>> ------------------------------------------------------------------------
>> [sandypit] /home/jam [55]% head /etc/systemd/system/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
>> Wants=dev-dvb-adapter0-frontend0.device
>> Wants=dev-dvb-adapter1-frontend0.device
>> After=dev-dvb-adapter0-frontend0.device
>> After=dev-dvb-adapter1-frontend0.device
>> ...
>
> I'd change --loglevel from crit to general and look at the log in
> /store/mythlogs/mythtbackend.201311......
>
> Not sure what the rest of the head /etc/systemd/system/mythbackend.service
> output looks like. Is there a HOME set. That would be reflected in the log.
> Exit code 130 is: GENERIC_EXIT_NO_MYTHCONTEXT.
>
I am running mythtv on Arch and the backend starts with no problem. My 
systemd file is slightly different to yours:

[Unit]
Description=MythTV Backend
After=network.target mysqld.service

[Service]
Type=simple
Environment=HOME=/var/lib/mythtv
User=mythtv
ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
ExecStop=/usr/bin/mythshutdown --setscheduledwakeup
#ExecStop=/usr/bin/mythshutdown --shutdown

[Install]
WantedBy=multi-user.target

I am not a systemd expert, so am not sure what the significance of the 
differences is. My systemd file was the one that was nstalled by pacman, 
I haven't altered it at all.

Ian.


More information about the mythtv-users mailing list