From f83b855f518d516014cee56f206ec226a2e8489f Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Tue, 1 Aug 2023 00:49:23 +1200 Subject: [PATCH] Provide sane defaults --- ChangeLog | 2 ++ bin/health-check | 4 ++-- debian/postinst | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac3615d..23b85ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ If mythtv-update-motd is run via interactive shell, always try to run, regardless of the flags. + Provide, hopefully sane, defaults in health-check. + 2023-07-27 Andrew Ruthven Install the systemd files into the UsrMerge location so we'll work with more distributions, thanks to Göran Uddeborgfor pointing this out. diff --git a/bin/health-check b/bin/health-check index 8dc0164..bbcda10 100755 --- a/bin/health-check +++ b/bin/health-check @@ -10,12 +10,12 @@ . /etc/default/mythtv-status -if [ "$EMAIL" = "" ] || [ "$EMAIL" = "none" ] +if [ "$EMAIL" = "none" ] then exit fi -/usr/bin/mythtv-status --host "${HOST:-localhost}" --email "$EMAIL" "$EMAIL_ARGS" +/usr/bin/mythtv-status --host "${HOST:-localhost}" --email "${EMAIL:-root}" "${EMAIL_ARGS:---email-only-on-alert}" # Keep things happy by always having a return code of 0. exit 0 diff --git a/debian/postinst b/debian/postinst index 96cc923..73d37d1 100644 --- a/debian/postinst +++ b/debian/postinst @@ -72,7 +72,7 @@ UPDATE_MOTD_ARGS="$UPDATE_MOTD_ARGS" # EMAIL: # A comma separated list of email address to send status emails to. # -# Set to none (or leave empty) to disable daily emails. +# Set to none to disable daily emails, if empty then default to root. EMAIL=$EMAIL # EMAIL_ARGS: -- 2.30.2