From: Andrew Ruthven Date: Mon, 31 Jul 2023 12:49:23 +0000 (+1200) Subject: Provide sane defaults X-Git-Tag: 1.2.0~11 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f83b855f518d516014cee56f206ec226a2e8489f;p=mythtv-status.git Provide sane defaults --- 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: