Package: mythtv-status
Version: 1.0.1-1
Severity: normal
Tags: patch

I used to get the following errors when mythtv-status would start:

  Mar 19 20:35:16 keflavik sh[3364]: rm: impossible de supprimer 
'/var/lib/mythtv-status/motd_update_disabled': Aucun fichier ou dossier de ce 
type

That translates to "can't delete .../motd_update_disabled: file not found".

To fix it, I put the following in 
/etc/systemd/system/mythtv-status.service.d/override.conf:

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c "rm -f /var/lib/mythtv-status/motd_update_disabled"
ExecStart=/usr/sbin/mythtv-update-motd
ExecStop=/bin/sh -c "touch /var/lib/mythtv-status/motd_update_disabled; rm -f 
/run/motd.mythtv-status";

Note the "-f" parameter on the "rm" command.

Attache is a patch that should fix this problem in the service file shipped
with the package.

Francois
--- mythtv-status.service	2020-03-22 12:48:59.108431139 -0400
+++ mythtv-status.service.fixed	2020-03-22 12:49:39.616102822 -0400
@@ -7,9 +7,9 @@
 [Service]
 Type=oneshot
 RemainAfterExit=true
-ExecStart=/bin/sh -c "rm /var/lib/mythtv-status/motd_update_disabled || true"
+ExecStart=/bin/sh -c "rm -f /var/lib/mythtv-status/motd_update_disabled"
 ExecStart=/usr/sbin/mythtv-update-motd
-ExecStop=/bin/sh -c "touch /var/lib/mythtv-status/motd_update_disabled; rm /run/motd.mythtv-status || true";
+ExecStop=/bin/sh -c "touch /var/lib/mythtv-status/motd_update_disabled; rm -f /run/motd.mythtv-status";
 
 [Install]
 WantedBy=multi-user.target

Reply via email to