I'm not sure how Ubuntu's flavor of systemd handles this, but in gerenal your
tvheadend.service
unit probably has an entry in the
[Service]
section for
EnvironmentFile=@, and your @ExecStart=
probably references
$TVH_OPTS@. If that's the case, edit the file indicated in the @EnvironmentFile@, and add your @--http_root
option to the
TVH_OPTS
definition.
To view your systemd unit file, it's easiest to do:
systemctl cat tvheadend@. If your unit does not have an @EnvironmentFile
that it references, you can just add the definition to the
ExecStart@. The easiest way to do that is to use @systemctl
to edit the unit. Make note of your existing
ExecStart@, and then run @systemctl edit tvheadend@. This will bring up an editor (most likely @nano@) with an empty buffer. In there, type:
[Service]
ExecStart=
ExecStart=<Insert here the original ExecStart command> --http_root <and here you add your option>
You need the section header (@[Service]@) so systemd knows which part to override, and the first blank @ExecStart
line is necessary to blank out the command in the supplied unit file.
Another option for editing the service unit is: @systemctl edit --full tvheadend@, which will start the editing buffer with the full text of the unit file for you to edit, instead of just specifying lines to override.