From: Andrew Ruthven Date: Fri, 11 Jan 2019 11:48:37 +0000 (+1300) Subject: Ensure we still work if RUN and ARGS are used instead of the new variables X-Git-Tag: 1.0.0~8 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23664393caac9d7cbcfcc7b6ed5fa46f3ed06d16;p=mythtv-status.git Ensure we still work if RUN and ARGS are used instead of the new variables --- diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index 59a54f5..027e6bb 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -15,6 +15,9 @@ NAME=mythtv-update-motd # Fedora style [ -r /etc/sysconfig/mythtv-status ] && . /etc/sysconfig/mythtv-status +# Support the old RUN variable +[ x$UPDATE_MOTD = x ] && UPDATE_MOTD=$RUN + if [ x$UPDATE_MOTD != xyes -o -f /var/lib/mythtv-status/motd_update_disabled ] then exit @@ -74,6 +77,8 @@ else cp $STUBFILE $TEMPFILE fi +# Support the old ARGS variable +[ x$UPDATE_MOTD_ARGS = x ] && UPDATE_MOTD_ARGS=$ARGS ret=0 mythtv-status $UPDATE_MOTD_ARGS -h $HOST >> $TEMPFILE || ret=$? diff --git a/debian/init.d b/debian/init.d index aee2760..cbaa57f 100644 --- a/debian/init.d +++ b/debian/init.d @@ -48,6 +48,9 @@ if [ -f /etc/default/$NAME ] ; then . /etc/default/$NAME fi +# Support the old RUN variable +[ x$UPDATE_MOTD = x ] && UPDATE_MOTD=$RUN + # Use this if you want the user to explicitly set 'UPDATE_MOTD' in # /etc/default/mythtv-status if [ "x$UPDATE_MOTD" != "xyes" ] ; then