[mythtv] MythTV 0.28 and systemd and Ubuntu 15.10 (wily) or 16.04 (xenial)
Bill Meek
keemllib at gmail.com
Thu Jan 7 21:30:43 UTC 2016
On 01/07/2016 03:11 PM, Peter Bennett wrote:
> Hi Guys
>
> Since Ubuntu 16.04 (Xenial) is not yet ready I am trying 0.28 with
> 15.10 (Wily).
>
> I installed xubuntu 15.10 and installed mythtv 0.28 from ppa:mythbuntu/0.28
>
> It looks like it is still trying to use Upstart, but Upstart has now
> been replaced by systemd. The backend is not starting up. It still is
> using a script in /etc/init/
>
> Am I missing something here?
>
> I am trying to get up to speed with systemd. As far as I can see we need
> a script in /etc/systemd/system/ and we need to run "sudo systemctl
> enable service-name.service". Can I help with getting this set up? I
> can create a script and test it then send it on to you for including in
> place of the upstart script?
Hi,
I'm running Ubuntu 15.10 and 0.28-pre.
1st, make sure you don't already a .service file for MythTV, I've
worked with users that did:
systemctl cat --no-pager mythtv-backend
If not, or if you want to adjust the one that's in /lib/systemd/system/...
then adding it to /etc/systemd/system/ as you said above is right. I've been
learning about it too and here's mine:
$ systemctl cat --no-pager mythtv-backend.service # /etc/systemd/system/mythtv-backend.service
# Useful commands, the 2nd set requires root privs.
# systemctl cat --no-pager mythtv-backend
# systemctl status mythtv-backend
# systemctl is-enabled mythtv-backend
#
# systemctl enable mythtv-backend
# systemctl daemon-reload
# systemctl reload mythtv-backend
# systemctl start mythtv-backend
# systemctl stop mythtv-backend
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
# TODO: Add TAG+="systemd" to the tuner udev rules and add to the next line.
After=mysqld.service network-online.target
[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStartPre=/usr/bin/nm-online --quiet --timeout=5
ExecStart=/usr/local/bin/mythbackend --logpath /var/log/mythtv --quiet $ADDITIONAL_ARGS $MYTHTV_BE_OPTS
StartLimitBurst=10
StartLimitInterval=15m
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
Pay attention to the output of systemctl status mythtv-backend. I've seen
users that were failing because the service wasn't enabled.
● mythtv-backend.service - MythTV Backend
Loaded: loaded (/etc/systemd/system/mythtv-backend.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2016-01-07 15:13:19 CST; 8min ago
Docs: https://www.mythtv.org/wiki/Mythbackend
Process: 1860 ExecStartPre=/usr/bin/nm-online --quiet --timeout=5 (code=exited, status=0/SUCCESS)
Main PID: 1926 (mythbackend)
CGroup: /system.slice/mythtv-backend.service
└─1926 /usr/local/bin/mythbackend --logpath /var/log/mythtv --quiet
Jan 07 15:13:19 ofc0 systemd[1]: Starting MythTV Backend...
Jan 07 15:13:19 ofc0 systemd[1]: Started MythTV Backend.
--
Bill
More information about the mythtv-dev
mailing list