* Drop versioned dependency on molly-guard, 0.4 was released in 2008.
* Move libmythtv-perl to by a Suggests, as it is doesn't exist in the
official Debian repo.
+ * Install systemd services and timers for regular tasks.
-- Andrew Ruthven <andrew@etc.gen.nz> Sun, 06 Dec 2020 22:51:12 +1300
#!/bin/sh
-. /etc/default/mythtv-status
-
-if [ "x$EMAIL" = "x" -o "x$EMAIL" = "xnone" ]
-then
- exit
-fi
-
-/usr/bin/mythtv-status --host $HOST --email $EMAIL $EMAIL_ARGS
+[ -x /usr/lib/mythtv-status/health-check ] \
+ && /usr/local/mythtv-status/health-check
# Keep run-parts happy by always returning with a return code of 0.
exit 0
usr/bin
+usr/libexec/mythtv-status
var/lib/mythtv-status
--- /dev/null
+#!/bin/sh
+# Copyright (c) 2007-2023 Andrew Ruthven <andrew@etc.gen.nz>
+# This code is hereby licensed for public consumption under the GNU GPL v3.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Run mythtv-status to perform a health check of the MythTV system.
+
+. /etc/default/mythtv-status
+
+if [ "$EMAIL" = "" ] || [ "$EMAIL" = "none" ]
+then
+ exit
+fi
+
+/usr/bin/mythtv-status --host "$HOST" --email "$EMAIL" "$EMAIL_ARGS"
+
+# Keep things happy by always having a return code of 0.
+exit 0
bin/mythtv-update-motd /usr/sbin
+debian/health-check usr/libexec/mythtv-status
+debian/lintian/overrides/mythtv-status usr/share/lintian/overrides
+debian/mythtv-status_health-check.service lib/systemd/system
+debian/mythtv-status_health-check.timer lib/systemd/system
+debian/mythtv-status_update-motd.service lib/systemd/system
+debian/mythtv-status_update-motd.timer lib/systemd/system
molly-guard/40-mythtv-recording-soon etc/molly-guard/run.d
update-motd.d/50-mythtv-status etc/update-motd.d
-debian/lintian/overrides/mythtv-status usr/share/lintian/overrides
--- /dev/null
+[Unit]
+Description=Daily mythtv-status health check of MythTV
+Documentation=man:mythtv-status(1)
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/mythtv-status/health-check
--- /dev/null
+[Unit]
+Description=Daily mythtv-status health check of MythTV
+Documentation=man:mythtv-status(1)
+
+[Timer]
+OnCalendar=Daily
+OnBootSec=15min
+
+[Install]
+WantedBy=timers.target
--- /dev/null
+[Unit]
+Description=mythtv-status MOTD update
+Documentation=man:mythtv-update-motd(1)
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/mythtv-update-motd
--- /dev/null
+[Unit]
+Description=mythtv-status MOTD update
+Documentation=man:mythtv-update-motd(1)
+
+[Timer]
+OnCalendar=*-*-* *:00,15,30,45
+OnBootSec=60
+
+[Install]
+WantedBy=timers.target
%:
dh $@
+
+override_dh_installsystemd:
+ dh_installsystemd mythtv-status.service \
+ mythtv-status_health-check.service \
+ mythtv-status_health-check.timer \
+ mythtv-status_update-motd.service \
+ mythtv-status_update-motd.timer