Hello All,
I am looking for a way to test if there is mail to send - and only bringing
up the link if the answer is positive.
Before using Diald I happily ran shell script - that albeit clumsy - did
the job. Now using Diald the script brings the link up.
Note - if I ran the script from root Diald only brought up the link if
there was mail to send. When I run it from cron - I get the indication that
no mail is there to send - but the link comes up anyway.
So...I am looking for a shell script I can use that will test if I have
mail - and only bring the linkup if I do.
Any ideas welcomed.
Thanks,
Col.
PS - here is my script
++++++++++++++++++++++++++++++++++
#!/bin/bash
ls /var/spool/mqueue > /tmp/mail_queue_test
if [ -s /tmp/mail_queue_test ] ; then
echo "Mail to Send - Starting the ppp connection"
/usr/sbin/ntpdate -v ntp.adelaide.edu.au # a command that should
bring up link
else
echo "No mail to send...nothing to do"
fi
rm /tmp/mail_queue_test
echo "All Done!"
exit 0
++++++++++++++++++++++++++++++++++++++
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]