Message of the day
Hi all, as I am new to this forum I'll start with a simple question.
How can I make "message of the day" rotate every day, and how could i add variables to it. i.e.: When i log into my linux box with ssh/telnet, i get this message: *Welcome to HAL9000, where everything is running extremely well. Now i want to add some variables to it: *Today is $$/$$/$$$$, and the time is $$:$$ *Todays wisdom is: $ (example: Grass can be smoked as well.) Can that be done? |
hmm, perhaps you could set up a cron job to pull a random line from say /usr/games/fortune (MESSAGEOFDAYVARIABLE=`/usr/games/fortune`, or a file of yours every day at midnight, or something like that
|
Thanks :)
I will have skip the time part then ...but no problem. Got enough clocks anyway. |
Quote:
Found out 'fortune' is encoded. |
try this:
/usr/games/fortune > /etc/motd as your cron job, that should work |
ahhaaa /etc/motd is message of the day :)
Finaly found it. Hey but what does fortune do then...and why should I use that in this case? |
fortune is nothing more than an electronic 'fortune cookie', i was simply using it as an example of what you can do...
|
OK, thanks again.
I will use php to do the job, since i have more experience in that. |
yeah, right, glad to be of service :D
|
...really ;)
|
All times are GMT -5. The time now is 06:29 AM. |