Raceman
Posts: 25
Joined: Thu Jul 03, 2014 10:07 pm

Re: Custom MOTD - Message of the Day

Tue Jul 10, 2018 10:01 am

Anyone?

User avatar
DougieLawson
Posts: 35836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Custom MOTD - Message of the Day

Wed Jul 11, 2018 4:16 pm

ps -ef | grep 'ss[h]d:.*@pts' finds any ssh logins.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Raceman
Posts: 25
Joined: Thu Jul 03, 2014 10:07 pm

Re: Custom MOTD - Message of the Day

Thu Jul 12, 2018 10:35 pm

DougieLawson wrote:
Wed Jul 11, 2018 4:16 pm
ps -ef | grep 'ss[h]d:.*@pts' finds any ssh logins.
Thanks

But it didnt work.

seanda21
Posts: 1
Joined: Sat Jun 15, 2019 10:34 pm

Re: Custom MOTD - Message of the Day

Sat Jun 15, 2019 10:38 pm

Loved this (a little late to the party of course). However, I also didn't like how it killed my bash prompt colour screen :D

I also moved this up the chain so it doesn't run in the ~/.bash_profile file
It now runs in /etc/update-motd.d/01-custom, and works like a charm

Here is details on how I did it - https://sbs.seandaniel.com/2019/06/upda ... td-on.html

And here is my final output:
Image

Enjoy

Ernst
Posts: 1215
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Custom MOTD - Message of the Day

Sun Jun 16, 2019 7:43 am

seanda21 wrote:
Sat Jun 15, 2019 10:38 pm

Here is details on how I did it - https://sbs.seandaniel.com/2019/06/upda ... td-on.html
There is something missing in your script, instead of

Code: Select all

rest < /proc/loadavg
it should be

Code: Select all

read one five fifteen rest < /proc/loadavg
The road to insanity is paved with static ip addresses

Return to “Beginners”