By default it only emails if there are schedule conflicts.
db_set $PACKAGE/enable $RUN
db_set $PACKAGE/host $HOST
+ db_set $PACKAGE/email $EMAIL
fi
# Ask questions.
db_input medium $PACKAGE/host || true
db_input medium $PACKAGE/enable || true
+db_input medium $PACKAGE/email || true
db_go
--- /dev/null
+#!/bin/sh
+
+. /etc/default/mythtv-status
+
+if [ "x$EMAIL" = "x" -o "x$EMAIL" = "xnone" ]
+then
+ exit
+fi
+
+/usr/bin/mythtv-status --email $EMAIL $EMAIL_ARGS
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"Report-Msgid-Bugs-To: Source: mythtv-status@packages.debian.org\n"
-"POT-Creation-Date: 2007-11-16 12:53+1300\n"
+"Report-Msgid-Bugs-To: andrew@etc.gen.nz\n"
+"POT-Creation-Date: 2007-11-21 14:45+1300\n"
"PO-Revision-Date: 2007-11-16 12:53+1300\n"
"Last-Translator: Francois Marier <francois@debian.org>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
"The MythTV backend to check, you only need to change this if you want to "
"check a different host."
msgstr ""
-"Le système MythTV à examiner. Vous n'avez à changer la valeur par défaut "
-"que si vous désirer examiner un autre hôte."
+"Le système MythTV à examiner. Vous n'avez à changer la valeur par défaut que "
+"si vous désirer examiner un autre hôte."
#. Type: boolean
#. Description
"Whether the Message of the Day should be updated on system boot and on a "
"regular basis."
msgstr ""
-"Mise à jour du message du jour du système lors du démarrage et sur une "
-"base régulière."
+"Mise à jour du message du jour du système lors du démarrage et sur une base "
+"régulière."
#. Type: boolean
#. Description
msgstr ""
"Pour changer la fréquence de mise à jour du message du jour, modifier le "
"fichier /etc/cron.d/mythtv-status."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Email status to?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Who should we send emails to on a daily basis?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "By default an email is only sent if there is a conflict."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "To disable set the email address to \"none\"."
+msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: mythtv-status 0.4-1\n"
-"Report-Msgid-Bugs-To: Source: mythtv-status@packages.debian.org\n"
-"POT-Creation-Date: 2007-11-16 12:53+1300\n"
+"Report-Msgid-Bugs-To: andrew@etc.gen.nz\n"
+"POT-Creation-Date: 2007-11-21 14:45+1300\n"
"PO-Revision-Date: 2007-11-18 18:40+0000\n"
"Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n"
"Language-Team: Portuguese <traduz@debianpt.org>\n"
#. Type: boolean
#. Description
#: ../templates:2001
-msgid "To adjust how often the MOTD is updated, edit /etc/cron.d/mythtv-status."
+msgid ""
+"To adjust how often the MOTD is updated, edit /etc/cron.d/mythtv-status."
+msgstr ""
+"Para ajustar a frequência de actualização do MOTD, edite /etc/cron.d/mythtv-"
+"status."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Email status to?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Who should we send emails to on a daily basis?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "By default an email is only sent if there is a conflict."
msgstr ""
-"Para ajustar a frequência de actualização do MOTD, "
-"edite /etc/cron.d/mythtv-status."
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "To disable set the email address to \"none\"."
+msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: Source: mythtv-status@packages.debian.org\n"
-"POT-Creation-Date: 2007-11-16 12:53+1300\n"
+"Report-Msgid-Bugs-To: andrew@etc.gen.nz\n"
+"POT-Creation-Date: 2007-11-21 14:45+1300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid ""
"To adjust how often the MOTD is updated, edit /etc/cron.d/mythtv-status."
msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Email status to?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Who should we send emails to on a daily basis?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "By default an email is only sent if there is a conflict."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "To disable set the email address to \"none\"."
+msgstr ""
RUN='yes'
fi
+ db_get $PACKAGE/email
+ EMAIL="${RET:-none}"
+
+ EMAIL_ARGS="${EMAIL_ARGS:--email-only-on-conflict}"
+
cat <<_eof > $DEBIANCONFIG
# $PACKAGE Debian configuration
#
# ARGS:
# Any extra arguments to pass to mythtv-status (i.e., -e and/or -d).
ARGS=$ARGS
+
+# EMAIL:
+# A comma separated list of email address to send status emails to.
+#
+# Set to none (or leave empty) to disable daily emails.
+EMAIL=$EMAIL
+
+# EMAIL_ARGS:
+# Command line arguments that are used when sending the daily email.
+EMAIL_ARGS=$EMAIL_ARGS
_eof
db_stop
regular basis.
.
To adjust how often the MOTD is updated, edit /etc/cron.d/mythtv-status.
+
+Template: mythtv-status/email
+Type: string
+Default: none
+_Description: Email status to?
+ Who should we send emails to on a daily basis?
+ .
+ By default an email is only sent if there is a conflict.
+ .
+ To disable set the email address to "none".