HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
[hylafax-users] Contributing an init script for faxgetty
Hi,
I've gotten hylafax working really well (thanks to the help from this
list) and since I need it running on a cluster of PCs I can't have the
faxgetty process being run from /etc/inittab.
Found a bash script someone wrote to do this but it was too primitive
and some portions didn't work with me. So I re-wrote most of it to
work. If you use this you'd need to install killproc program.
This is good cos you can do /etc/init.d/faxgetty {start | stop | status}
Anyone is free to use it and/or make it better. So far I hardcoded the
/dev/ttyS0 inside it to suit my needs. If someone can make it better
and parameterize it or make it get the device from
/var/spool/fax/config.ttyS0 or something, that'd be cool (me not much
of a scripter).
--
#!/sbin/runscript
#
# By George El-Haddad
#
# Free for anyone to modify
#
# description: Fax Terminal for Hylafax
# processname: faxgetty
# pidfile: /var/run/faxgetty.pid
start() {
echo -n "Starting FaxGetty: "
/usr/sbin/faxgetty -D /dev/ttyS0
echo
touch /var/lock/subsys/faxgetty
eend $?;
}
status() {
if [ -f /var/lock/subsys/faxgetty ]; then
echo -n "FaxGetty is running on /dev/ttyS0"
echo
eend 0
else
echo -n "FaxGetty is not running"
echo
eend 0
fi
}
stop() {
echo -n "Shutting down FaxGetty: "
killproc /usr/sbin/faxgetty
echo
rm -f /var/lock/subsys/faxgetty
rm -f /var/run/faxgetty.pid
eend $?;
}
--
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
"If I were a roman statue, I'd be made alabastard"
--
George H
george.dma@xxxxxxxxx
____________________ 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@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*