From: Göran Uddeborg Date: Wed, 26 Jul 2023 12:42:25 +0000 (+1200) Subject: Use a default value for HOST X-Git-Tag: 1.2.0~19 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78186592336061b0c86189eeca5b1bb0a2b8f37;p=mythtv-status.git Use a default value for HOST --- 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.