From d78186592336061b0c86189eeca5b1bb0a2b8f37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6ran=20Uddeborg?= Date: Thu, 27 Jul 2023 00:42:25 +1200 Subject: [PATCH] Use a default value for HOST --- ChangeLog | 2 ++ bin/health-check | 2 +- bin/mythtv-update-motd | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6445eff..f3f09dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ 2023-07-27 Göran Uddebor Install update-update-motd + Use a default for $HOST in all scripts. + 2023-07-23 Andrew Ruthven Release version 1.1.0. diff --git a/bin/health-check b/bin/health-check index 39e739c..8dc0164 100755 --- a/bin/health-check +++ b/bin/health-check @@ -15,7 +15,7 @@ then exit fi -/usr/bin/mythtv-status --host "$HOST" --email "$EMAIL" "$EMAIL_ARGS" +/usr/bin/mythtv-status --host "${HOST:-localhost}" --email "$EMAIL" "$EMAIL_ARGS" # Keep things happy by always having a return code of 0. exit 0 diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index a507e7f..3c92eaa 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -82,7 +82,7 @@ fi [ "$UPDATE_MOTD_ARGS" = "" ] && UPDATE_MOTD_ARGS=$ARGS ret=0 -mythtv-status $UPDATE_MOTD_ARGS -h $HOST >> $TEMPFILE || ret=$? +mythtv-status $UPDATE_MOTD_ARGS -h "${HOST:-localhost}" >> $TEMPFILE || ret=$? if [ $ret -eq 0 ] || [ $ret -eq 1 ]; then if [ ! -f $TEMPFILE ]; then echo My temporary file has gone away, failed. -- 2.30.2