]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Update the MOTD.
authorAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Sun, 14 Oct 2007 22:12:56 +0000 (11:12 +1300)
committerAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Sun, 14 Oct 2007 22:12:56 +0000 (11:12 +1300)
bin/mythtv-update-motd [new file with mode: 0755]

diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd
new file mode 100755 (executable)
index 0000000..c21cc6d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+[ ! -f /var/run/motd.orig ] && cp /var/run/motd /var/run/motd.orig
+
+cp /var/run/motd.orig /var/run/motd.new
+if mythtv-status >> /var/run/motd.new
+then
+  mv /var/run/motd.new /var/run/motd
+fi