Cover V05, I05
Article
Listing 1
Listing 2
Listing 3
Sidebar 1
Sidebar 2

may96.tar


Listing 3: ksh

#!/bin/bash
#This is a script to flush out incomming mail queues and send out any pages due
#Usage: asap.ksh

# Call my UUCP feed
/usr/lib/uucp/uucico -q -f -semory
/usr/lib/uucp/uuxqt

# Flush the sendmail queue
/usr/sbin/sendmail -q

# Handle the page queues
CALLNUM=`/bin/ls /var/spool/asap | /bin/head -1`
while [ $CALLNUM ] && !([ -e /var/spooluucp/LCK..modem ])
do
if !([ -e /var/spool/uucp/LCK..modem ])
then
/usr/local/bin/kermit /usr/lib/asap/asap.scr /var/spool/asap/$CALLNUM $CALLNUM
#This is a very optimistic removal, it really should check an exit code or something
rm /var/spool/asap/$CALLNUM
CALLNUM=`/bin/ls /var/spool/asap | /bin/head -1`
fi
done

# End of File