+2008-04-19 Andrew Ruthven
+ Add a molly-guard check
+
2008-04-11 Andrew Ruthven
Provide helper scripts that'll return true if the MythTV backend
is:
Package: mythtv-status
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, libwww-perl, libxml-libxml-perl, libdate-manip-perl, libmime-perl
-Suggests: libmythtv-perl
+Suggests: libmythtv-perl, molly-guard (>= 0.3.3-1)
Description: Show the status of a MythTV backend
Shows the current status of a local or remote MythTV backend and up to
the next 10 recordings for today and tomorrow.
bin/mythtv-status usr/bin
bin/mythtv_recording_now usr/bin
bin/mythtv_recording_soon usr/bin
+molly-guard/mythtv-recording-soon usr/share/molly-guard/checks.d/40-mythtv-recording-now
--- /dev/null
+#!/bin/sh
+
+ME=molly-guard
+
+if [ ! -f /usr/bin/mythtv_recording_soon ]; then
+ echo "I: I can't find /usr/bin/mythtv_recording_soon, skipping check"
+ exit 0;
+fi
+
+HOSTNAME="$(hostname --short)"
+
+sigh()
+{
+ echo "Good thing I asked; I won't $CMD $HOSTNAME ..."
+ exit 1
+}
+
+
+if /usr/bin/mythtv_recording_soon; then
+ trap 'echo;sigh' 1 2 3 9 10 12 15
+ echo -n "MythTV is either recording now, or will be soon. Type YES to $CMD: "
+ read CONFIRM || :
+
+ [ $(echo "x$CONFIRM" | tr 'A-Z' 'a-z') = "xyes" ] || sigh
+
+ trap - 1 2 3 9 10 12 15
+fi
+
+exit 0
+