+2023-08-01 Andrew Ruthven
+ If mythtv-update-motd is run via interactive shell, always try to run,
+ regardless of the flags.
+
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.
our hooks for those.
2023-07-27 Göran Uddebor
- Install update-update-motd
+ Install mythtv-update-motd
Use a default for $HOST in all scripts.
# Support the old RUN variable
[ "$UPDATE_MOTD" = "" ] && UPDATE_MOTD=$RUN
-if [ "$UPDATE_MOTD" != "yes" ] || [ -f /var/lib/mythtv-status/motd_update_disabled ]
+# Test for an interactive shell (in bash $- will include i, for dash we need
+# to check to see if FD 0 is connected), if we are interactive always try to
+# update the MOTD.
+if [ "$-" = "*i*" ] || [ -t 0 ]
then
- exit
+ echo Going to update the MOTD for the MythTV status
+else
+ if [ "$UPDATE_MOTD" != "yes" ] || [ -f /var/lib/mythtv-status/motd_update_disabled ]
+ then
+ exit
+ fi
fi
WORKFILE=/run/motd
exit 1
fi
+if [ "$-" = "*i*" ] || [ -t 0 ]
+then
+ echo Updated the MOTD
+fi
+
# Local Variables:
# sh-basic-offset: 2
# End: