The only thing that's keeping me from smacking something against the
screen right now is the outlook to a possible solution...
I'm trying to make the...##@@%$ cron to connect to my ISP, send mail,
download new ones and switch off. Pritty straight forward I would think.
Nevertheless it doesn't work. Another mistake I made was thinking this
would be simple.
The crontab looks like this:
00 08 * * * sh /usr/local/sbin/get_mail
get_mail is a small script that does all the things necessary to connect,
send, download and switch off. Under normal circumstances it works without
problems. Evoked through cron I first got mails (messages) the commands
couldn't be found - ???? - due to which I entered the full path to the
commands. Even then it doesn't work because cron can't or doesn't start
the ppp-on script from /usr/sbin... The rest it executes but without
success because there's no connection. Anybody?
get_mail script looks like this:
#!/bash/sh
if /usr/sbin/ppp-on
then
sleep 40;/sbin/ifconfig;usr/sbin/sendmail
-q;fetchmail;/usr/sbin/ppp-off;exit
else
<message about lost conection>
fi
sleep 90
if /usr/sbin/ppp-on
then
sleep 40;/sbin/ifconfig;usr/sbin/sendmail
-q;fetchmail;/usr/sbin/ppp-off;exit
else
<message try again>
fi
exit
Please, keep in mind I started doing scripts only some weeks ago...
Zoki.
Mailed with Linux and Pine.
%% Fin de message / End of message %%
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.