Koozali.org: home of the SME Server

Fortune

Ron

Fortune
« on: October 05, 2003, 11:05:27 AM »
Greetings all,

Has anyone taken the time to get Fortune (the random quote/factoid generator) to work on 5.5???

If so, how? I am not having much luck.

Thanks
Ron

Ron

Re: Fortune
« Reply #1 on: October 05, 2003, 11:37:34 AM »
Ok, I figured out what I needed for fortune to work(needed updated Fortune).

 Now, how can I get it to run say once every half hour and save the fortune to a file that can be used as my signiture file for e-mail?

Thanks in advance
Ron

Ron wrote:
>
> Greetings all,
>
> Has anyone taken the time to get Fortune (the random
> quote/factoid generator) to work on 5.5???
>
> If so, how? I am not having much luck.
>
> Thanks
> Ron

Guck Puppy

Re: Fortune
« Reply #2 on: October 06, 2003, 12:11:33 AM »
I think you can make a script :

pico /home/e-smith/files/yourusername/write_fortune.sh

into it write :

#!/bin/sh
/usr/bin/fortune -s > home/fortunesig.txt

make custom CRON template :

mkdir -p /etc/e-smith/templates-custom/etc/crontab
cd /etc/e-smith/templates-custom/etc/crontab
pico 99fortune

into it write :

# 30 minute fortune generation for email sig
30 * * * * root /home/e-smith/files/yourusername/write_fortune.sh

expand the template
/sbin/e-smith/expand-template /etc/crontab

You didn't say what email program you use, so it's up to you to figure out how to get the "fortunesig.txt" that will live in your home directory into your email client.

G

PS. Any notice anything bogus here, shout.