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] Contributing an init script for faxgetty



* George H <george.dma@xxxxxxxxx> [070226 10:02]:
> 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.

I'm not sure why not?  If you're building a cluster, don't they all have
to be running?

> 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).

If you're using Debian, they have a much more complete solution in their
HylaFAX init scripts.  It actually starts/stops faxgetty's when the rest
of HylaFAX is started/stopped.  Here's "part" of it:

      cd ${HYLAFAX_HOME}/etc
      devices="`echo_fax_devices`"
      if [ ${USE_FAXGETTY} = "yes" ]; then
        log_progress_msg "faxgetty"
        for device in $devices none; do
          [ "$device" = none ] && continue
          ${FAXGETTY} `echo $device | cut -d . -f 2` >/dev/null 2>&1 </dev/null &
        done
      elif [ ${USE_FAXGETTY} != "init" ]; then
        log_progress_msg "faxmodem"
        for device in $devices none; do
          [ "$device" = none ] && continue
          ${FAXMODEM} `echo $device | cut -d . -f 2` >/dev/null 2>&1 </dev/null &
        done
      fi
      # do nothing for "init"

The official Debian packages are very well done and complete.  If you're
building a cluster and not using Debian, I would recommend switching ;-)

If that's not an option, you can see the Debian packages at
packages.debian.org.

a.

-- 
Aidan Van Dyk                                             Create like a god,
aidan@xxxxxxxxxxx                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

Attachment: signature.asc
Description: Digital signature




Project hosted by iFAX Solutions