HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] Send 1 Fax, Then Can Never Receive
So, I decided to write a shell script to re-initialize the modem killing
faxgetty when appropiate (after sending a fax, in my case).
I am testing it right now. Hopefully it will not mess my HylaFAX server...
Meanwhile I'd like to know what you think...And especially if there is a
better solution to my problems (see my previous messages to this list).
The script takes the following actions:
1) checks for the status file of the serial line my modem is attached to
(ttyS1)
2) reads and verifies the content of the status file
3) if HylaFAX is not running or initializing, then the script checks for
the UUCP lock file
4) if the lock file is not present, then kills faxgetty
#!/bin/sh
#
# faxgetty-init
# description: checks the status of the hylafax server
# and intialize the modem if not in use
#
read status </var/spool/hylafax/status/ttyS1
if [ -n "$status" ]
then # Status file exists and is not null
if [ "$status" == "Running and idle" ] # Hylafax OK
then
exit 0
elif [ "$status" == "Initializing server" ] # Hylafax OK
then
exit 0
else
if [ -f "/var/lock/LCK..ttyS1" ] # Modem locked: do nothing
then
exit 0
else # Modem not locked: kill faxgetty, it will respawn as per /etc/inittab
/usr/bin/killall faxgetty
exit 0
fi
fi
else
exit 1 # Hylafax status not available
fi
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*