[mythtv-users] Damaged recordings

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Mar 5 13:40:51 UTC 2017


On Sun, 5 Mar 2017 12:08:18 +0100, you wrote:

>On 04/03/17 18:54, John P Poet wrote:
>> Run your mythbackend with 'record' logging (e.g. '-v
>> record:info,channel').  Then, after the next time this happens, check
>
>I'm running Ubuntu 16.04 and therefore systemd.
>
>Digging around what get installed by the mythtv-backend package, I see a
>/lib/systemd/system/mythtv-backend.service (which I assume I should not
>edit, as it would get overwritten by the next update), which contains
>
>EnvironmentFile=-/etc/mythtv/additional.args
>ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
>
>I'm not sure what the leading "-" means in EnvironmentFile
>
>I created /etc/mythtv/additional.args with -v record:info,channel and
>restarted mythbackend, but don't see any additional logging:
>
>Mar  5 12:00:42 pan mythbackend: mythbackend[6648]: N thread_unknown
>mythcommandlineparser.cpp:2603 (ConfigureLogging) Enabled verbose msgs:
>general
>Mar  5 12:00:42 pan mythbackend: mythbackend[6648]: N thread_unknown
>logging.cpp:920 (logStart) Setting Log Level to LOG_INFO
>Mar  5 12:00:42 pan mythbackend: mythbackend[6648]: I Logger
>logging.cpp:313 (run) Added logging to the console
>
>Or should/can I simply just override this by creating my own
>/etc/systemd/system/mythtv-backend.service ?
>
>Regards
>
>Jeff

Your /etc/mythtv/additional.args file needs to look like this:

ADDITIONAL_ARGS=-v record:info,channel

Systemd environment files are just like setting up variables in a bash
file, so you need to specify the name of each variable.  You can use
as many variables as you like and use them in some other places in the
.service file or in an override file that modifies the .service file.

The - symbol at the start of an EnvironmentFile specification means
that the file does not have to exist - if it does not exist, the
.service file will still work, and no errors or warnings will occur.

In Mythbuntu, if you want to create an override file for the
/lib/systemd/system/mythtv-backend.service file, you need to create a
new subdirectory (chown root:root, chmod u=rwx,g=rx,o=rx):

/etc/systemd/system/mythtv-backend.service.d

In that directory you put a .conf file (the name does not matter, the
.conf does).  I call mine mythtv-backend-override.conf.  You can have
many different .conf files if you like.  In that .conf file, you can
put lines that override lines in the mythtv-backend.service file.  You
need to check the documentation on how it works, as there are various
tricks to it, like how you replace a line instead of adding an extra
line of the same type.

The systemd documentation is here:

  https://www.freedesktop.org/wiki/Software/systemd


More information about the mythtv-users mailing list