]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Include systemd service and timer files
authorAndrew Ruthven <andrew@etc.gen.nz>
Sun, 16 Jul 2023 02:58:26 +0000 (14:58 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Mon, 17 Jul 2023 11:31:30 +0000 (23:31 +1200)
12 files changed:
ChangeLog
Makefile
bin/health-check [moved from debian/health-check with 100% similarity]
debian/cron.d
debian/cron.daily
debian/install
debian/patches/makefile-man-path.patch
systemd/mythtv-status.service [moved from debian/mythtv-status.service with 100% similarity]
systemd/mythtv-status_health-check.service [moved from debian/mythtv-status_health-check.service with 70% similarity]
systemd/mythtv-status_health-check.timer [moved from debian/mythtv-status_health-check.timer with 100% similarity]
systemd/mythtv-status_update-motd.service [moved from debian/mythtv-status_update-motd.service with 72% similarity]
systemd/mythtv-status_update-motd.timer [moved from debian/mythtv-status_update-motd.timer with 76% similarity]

index 71b35b67feafd6ecf4056fe52fae53d3ad19c0cf..0589e2eac535cc9f604c62cbe17dfe195c366f3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,9 @@
 
   Actually install the mythtv-update-motd man page!
 
+  Provide systemd service and timer files in tarball, hopefully useful as a
+  starting point for distros other than Debian.
+
 2001-02-14  Andrew Ruthven
   Release version 1.0.2.
 
index f74eddc4eb2d26e520804cf03422bf34349ef604..e16d8f7659ca5a1f3b8faef82f1b3d4766619ce9 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
 #!/usr/bin/make -f
 
 BINDIR=$(DESTDIR)/usr/bin
+LIBEXECDIR=$(DESTDIR)/usr/libexec/mythtv-status
 MANDIR=$(DESTDIR)/usr/man
+SYSTEMDDIR=$(DESTDIR)/lib/systemd/system
 
 package=mythtv-status
 releases=sid
@@ -69,15 +71,19 @@ upload: $(RELEASE_FILES)
 
 install:
        install -d $(BINDIR)
+       install -d $(LIBEXECDIR)
        install -d $(MANDIR)/man1
        install -d $(MANDIR)/man8
+       install -d $(SYSTEMDDIR)
        install -m 775 bin/mythtv-status $(BINDIR)
        install -m 775 bin/mythtv_recording_now $(BINDIR)
        install -m 775 bin/mythtv_recording_soon $(BINDIR)
+       install -m 775 bin/health-check $(LIBEXECDIR)
        pod2man bin/mythtv-status > $(MANDIR)/man1/mythtv-status.1
        install -m 644 man/mythtv-update-motd.8 $(MANDIR)/man8
        install -m 644 man/mythtv_recording_now.1 $(MANDIR)/man1
        install -m 644 man/mythtv_recording_soon.1 $(MANDIR)/man1
+       install -m 644 systemd/* $(SYSTEMDDIR)
 
 test:
        PERL_DL_NONLAZY=1 perl "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)
similarity index 100%
rename from debian/health-check
rename to bin/health-check
index 0dcad6a39b3286bf174fc6b2214c6ec68de5e641..9370fa420eb10b424575486210fe6cbcf7a8ad19 100644 (file)
@@ -1,4 +1,4 @@
 #
 # Regular cron jobs for the mythtv-status package
 #
-*/10 * * * *   root    [ -x /usr/sbin/mythtv-update-motd ] && /usr/sbin/mythtv-update-motd > /dev/null
+*/10 * * * *   root    [ -x /usr/sbin/mythtv-update-motd ] && [ ! -d /run/systemd/system ] && /usr/sbin/mythtv-update-motd > /dev/null
index 34cc283ea300c5156ae64bc8ba407e3b4c00d374..a0302c81bc55343fb7d0d569efe25b19d63d7439 100644 (file)
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+# Skip in favour of systemd timer
+[ -d /run/systemd/system ] && exit 0
+
+# Common script shared with the systemd service to perform a health
+# check of the MythTV system..
 [ -x /usr/lib/mythtv-status/health-check ] \
     && /usr/local/mythtv-status/health-check
 
index 741d3191b52b948d563bfd1edf26bf71b9743e3c..b70ceade54ec375d49acf5b8a393a64f3ffb1657 100644 (file)
@@ -1,9 +1,4 @@
 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
index a7891a83437a1223e6f23b506daf3b19fca7d2f1..4055a49436a5ba41b9dc149f04768195c9a38ad9 100644 (file)
@@ -6,12 +6,12 @@ Last-Update: 2023-07-16
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/Makefile
 +++ b/Makefile
-@@ -1,7 +1,7 @@
- #!/usr/bin/make -f
+@@ -2,7 +2,7 @@
  
  BINDIR=$(DESTDIR)/usr/bin
+ LIBEXECDIR=$(DESTDIR)/usr/libexec/mythtv-status
 -MANDIR=$(DESTDIR)/usr/man
 +MANDIR=$(DESTDIR)/usr/share/man
+ SYSTEMDDIR=$(DESTDIR)/lib/systemd/system
  
  package=mythtv-status
- releases=sid
similarity index 70%
rename from debian/mythtv-status_health-check.service
rename to systemd/mythtv-status_health-check.service
index 6948fa8e91492d951966ebc76d66c4bdd0f1dc63..fbd0a0ae32ccdc8f9ba07c3e9662535c5297dd94 100644 (file)
@@ -4,4 +4,4 @@ Documentation=man:mythtv-status(1)
 
 [Service]
 Type=oneshot
-ExecStart=/usr/lib/mythtv-status/health-check
+ExecStart=/usr/libexec/mythtv-status/health-check
similarity index 72%
rename from debian/mythtv-status_update-motd.service
rename to systemd/mythtv-status_update-motd.service
index c044662d267e979ca47508c6ba2827575ba37801..8ad6dfb81790dc7645b2fd62ccfcc4f4ad57c656 100644 (file)
@@ -1,6 +1,6 @@
 [Unit]
 Description=mythtv-status MOTD update
-Documentation=man:mythtv-update-motd(1)
+Documentation=man:mythtv-update-motd(8)
 
 [Service]
 Type=oneshot
similarity index 76%
rename from debian/mythtv-status_update-motd.timer
rename to systemd/mythtv-status_update-motd.timer
index 09dfcd97c6babc38b6ab1f86ebf91d6d4a24a534..cd1cea805094e3fba7f5aa54b712d9d824bb6112 100644 (file)
@@ -1,6 +1,6 @@
 [Unit]
 Description=mythtv-status MOTD update
-Documentation=man:mythtv-update-motd(1)
+Documentation=man:mythtv-update-motd(8)
 
 [Timer]
 OnCalendar=*-*-* *:00,15,30,45