--- /dev/null
+#!/bin/sh
+# Copyright (c) 2007 Andrew Ruthven <andrew@etc.gen.nz>
+# This code is hereby licensed for public consumption under the GNU GPL v2.
+#
+# 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
+
+# Return an exit code of 0 if the MythTV backend is currently recording
+# a show.
+
+# Where Debian stores the config info.
+if [ -f /etc/default/mythtv-status ]
+then
+ . /etc/default/mythtv-status
+fi
+
+/usr/bin/mythtv-status -h ${HOST:=localhost} --return-code-only --recording-now
+
+if [ $? -eq 1 ]
+then
+ exit 0
+else
+ exit 1
+fi
--- /dev/null
+#!/bin/sh
+# Copyright (c) 2007 Andrew Ruthven <andrew@etc.gen.nz>
+# This code is hereby licensed for public consumption under the GNU GPL v2.
+#
+# 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
+
+# Return an exit code of 0 if the MythTV backend is currently recording
+# a show or will be recording a show soon (in the next hour).
+
+# Where Debian stores the config info.
+if [ -f /etc/default/mythtv-status ]
+then
+ . /etc/default/mythtv-status
+fi
+
+/usr/bin/mythtv-status -h ${HOST:=localhost} --return-code-only \
+ --recording-now --next-recording
+
+if [ $? -eq 1 ]
+then
+ exit 0
+else
+ exit 1
+fi