Mailing List Archive

mythtv-status stopped showing up in motd
Getting mythtv-status to consistently show up in motd has always been
hit or miss for me. But it still showed up most of the time, until
about a week ago. Now it doesn't show up ever. I have tried purging
and reinstalling. Running mythtv-status from the command line still
works fine. Does anybody know how to make sure that mythtv-status is
in the message of the day consistently when I sign in via ssh?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
On Sun, 2009-11-22 at 23:43 -0500, Johnny wrote:
> Getting mythtv-status to consistently show up in motd has always been
> hit or miss for me. But it still showed up most of the time, until
> about a week ago. Now it doesn't show up ever. I have tried purging
> and reinstalling. Running mythtv-status from the command line still
> works fine. Does anybody know how to make sure that mythtv-status is
> in the message of the day consistently when I sign in via ssh?

Hi Johnny,

What distribution are you running?

Cheers,

--
Andrew Ruthven
Wellington, New Zealand
At home: andrew@etc.gen.nz | linux.conf.au 2010
| Follow the signs. Visit Wellington!
| http://www.lca2010.org.nz
Re: mythtv-status stopped showing up in motd [ In reply to ]
> What distribution are you running?

Sorry I should have included that up front. I am running Mythbuntu
9.10. I am currently running .22-fixes build 22890 from the daily
auto-builds.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
On Wed, Nov 25, 2009 at 2:34 AM, Johnny <jarpublic@gmail.com> wrote:
>> What distribution are you running?
>
> Sorry I should have included that up front. I am running Mythbuntu
> 9.10. I am currently running .22-fixes build 22890 from the daily
> auto-builds.

You might want to try reinstalling mythtv-status:

sudo apt-get install --reinstall mythtv-status
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
> You might want to try reinstalling mythtv-status:
>
> sudo apt-get install --reinstall mythtv-status

Yeah I mentioned that in my post. I tried that and I even tried
purging and then doing a clean install.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
> Yeah I mentioned that in my post. I tried that and I even tried
> purging and then doing a clean install.

Oops, I should've read it properly. Have you tried removing the
redirects to /dev/null so cron sends you the output?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
> Oops, I should've read it properly. Have you tried removing the
> redirects to /dev/null so cron sends you the output?

Thanks for the tip. The output seems normal. When I run sudo
/etc/init.d/mythtv-status reload, then /etc/motd is updated properly.
But when I log in the motd day is reset and it doesn't show up. I even
tried doing the reload and then logging in with a second ssh window.
The act of logging in seems to reset the motd somehow. I don't know
enough about the login process to know where to look to find out how
this could be happening.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
On Tue, Nov 24, 2009 at 10:57 PM, Johnny <jarpublic@gmail.com> wrote:
>> Oops, I should've read it properly. Have you tried removing the
>> redirects to /dev/null so cron sends you the output?
>
> Thanks for the tip. The output seems normal. When I run sudo
> /etc/init.d/mythtv-status reload, then /etc/motd is updated properly.
> But when I log in the motd day is reset and it doesn't show up. I even
> tried doing the reload and then logging in with a second ssh window.
> The act of logging in seems to reset the motd somehow. I don't know
> enough about the login process to know where to look to find out how
> this could be happening.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

I noticed that on my ubuntu karmic setup. It seems like ubuntu is
updating the motd on login so it can display update related
information - you have X number of packages to update, need to reboot
etc. If you look at /etc/update-motd.d/ you can see the files it
pulls together to do this. You have a couple options. You can turn
this login generation of the motd off and let mythtv-status generate
the motd like before. I don't know where you configure this though,
since I like those messages I didn't look for it, so I can't help you
there. Googling "/etc/update-motd.d karmic" or something like that
will probably get you started or dpkg -S /etc/update-motd.d should
give you an idea of which package to look at.

If you leave it on you can create a new entry in this folder to add
the mythtv-status stuff. You have more options here as well, you can
have mythtv-status run everytime you login, adding a second or two to
your login but having up to date information, or have mythtv-status
run on a schedule and not incur the delay at the expense of slightly
stale information (depending on how often it runs).

For everytime you login. This should use the settings configured in
/etc/default/mythtv-status

FILE: /etc/update-motd.d/50-mythtv-status
#!/bin/sh

if [ -x /usr/bin/mythtv-status ] ; then
if [ -f /etc/default/mythtv-status ] ; then
. /etc/default/mythtv-status
/usr/bin/mythtv-status $ARGS -h $HOST
else
/usr/bin/mythtv-status
fi
fi



To use a scheduled mythtv-status, this is like the current/old way to do it
FILE: /etc/update-motd.d/50-mythtv-status
#!/bin/sh
[ -f /var/run/mythtv-status] && cat /var/run/mythtv-status


AND edit the /etc/init.d/mythtv-status so it writes to a separate file
instead of trying to manage the motd

I don't have the original /etc/init.d/mythtv-status to do a diff of,
but just change the start and stop sections so they look like below

start|reload|refresh|restart|force-reload)
log_daemon_msg "Updating $DESC" "$NAME"
rm -f "/var/run/$NAME" 2>/dev/null || true
$DAEMON $ARGS -h $HOST > "/var/run/$NAME"
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
rm -f "/var/run/$NAME" 2>/dev/null || true
log_end_msg 0
;;

You also need to have a cron entry to do a reload on a schedule, but
when you installed mythtv-status with apt it should ave already set
that up.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
> For everytime you login.  This should use the settings configured in
> /etc/default/mythtv-status
>
> FILE: /etc/update-motd.d/50-mythtv-status
> #!/bin/sh
>
> if [ -x /usr/bin/mythtv-status ] ; then
>       if [ -f /etc/default/mythtv-status ] ; then
>               . /etc/default/mythtv-status
>               /usr/bin/mythtv-status $ARGS -h $HOST
>       else
>               /usr/bin/mythtv-status
>       fi
> fi

Wow, thanks for all of the info. I went ahead and went with this fix
to run each time I log in. The time difference isn't even noticeable
to me, and it gives me the most accurate info. Thanks again for the
detailed info on a fix.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythtv-status stopped showing up in motd [ In reply to ]
If myth-status isn't being run on cron; won't that affect mythweb status
info? I.e. mythsweb status info will only be updated when someone logs in
via ssh?
Just a thought/ question?
R

Please excuse brevity and mistakes, this email was composed on a mobile
phone.

Thanks and regards,
Richard Morton



On 26 Nov 2009 02:26, "Johnny" <jarpublic@gmail.com> wrote:

> For everytime you login. This should use the settings configured in >
/etc/default/mythtv-status ...
Wow, thanks for all of the info. I went ahead and went with this fix
to run each time I log in. The time difference isn't even noticeable
to me, and it gives me the most accurate info. Thanks again for the
detailed info on a fix.

_______________________________________________ mythtv-users mailing list
mythtv-users@mythtv.org ht...
Re: mythtv-status stopped showing up in motd [ In reply to ]
On Thu, Nov 26, 2009 at 6:58 AM, Richard Morton
<richard.e.morton@gmail.com> wrote:
> If myth-status isn't being run on cron; won't that affect mythweb status
> info? I.e. mythsweb status info will only be updated when someone logs in
> via ssh?
> Just a thought/ question?
> R
>
> Please excuse brevity and mistakes, this email was composed on a mobile
> phone.
>
> Thanks and regards,
> Richard Morton
>
>
>
> On 26 Nov 2009 02:26, "Johnny" <jarpublic@gmail.com> wrote:
>
>> For everytime you login.  This should use the settings configured in >
>> /etc/default/mythtv-status ...
>
> Wow, thanks for all of the info. I went ahead and went with this fix
> to run each time I log in. The time difference isn't even noticeable
> to me, and it gives me the most accurate info. Thanks again for the
> detailed info on a fix.
>
> _______________________________________________ mythtv-users mailing list
> mythtv-users@mythtv.org ht...
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>

The mythtv-status program is separate from mythweb's backend status
page. If you look at the php for the mythweb status page you can see
that it pretty much just includes the backend status page into the
template. You can see the status page at http;//[backend's ip]:6544
without mythweb even installed.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users