Old news, certainly, but I wasn’t able to get upstart to start iaxmodem and Hylafax’ faxgetty properly so after much trial and error, here’s how to make it work…

/etc/sysconfig/init add the following line:

ACTIVE_IAXFAX=”ttyIAX0 ttyIAX1 ttyIAX2 ttyIAX3 ttyIAX4 ttyIAX5 ttyIAX6 ttyIAX7 ttyIAX8 ttyIAX9″

I had tried to create this as a range (ttyIAX[0-9]) but the resulting process ended up being started with /usr/local/sbin/faxgetty ttyIAX[0-9] and nothing worked correctly, so unfortunately for actual operation you’ll have to build a list of your desired ttys.

Create /etc/init/faxgetty.conf

# faxgetty – faxgetty
#
# This service maintains a faxgetty on the sepcified device.
stop on runlevel [016]

respawn
instance $TTY
exec /usr/local/sbin/faxgetty $TTY

and /etc/init/iaxmodem.conf

# iaxmodem – iaxmodem
#
# This service maintains an iaxmodem on the sepcified device.
stop on runlevel [016]

respawn
instance $TTY
exec /usr/local/sbin/iaxmodem $TTY

and then create the scripts which start each…
/etc/init/start-faxgettys.conf

#
# This service starts the configured number of faxgettys.
start on stopped rc RUNLEVEL=[2345]

env ACTIVE_IAXFAX=”ttyIAX0 ttyIAX1 ttyIAX2 ttyIAX3 ttyIAX4 ttyIAX5 ttyIAX6 ttyIAX7 ttyIAX8 ttyIAX9″
task
script
. /etc/sysconfig/init
for ttyIAX in $(echo $ACTIVE_IAXFAX) ; do
initctl start faxgetty TTY=$ttyIAX
done
end script

and /etc/init/start-iaxmodems.conf

#
# This service starts the configured number of gettys.
start on stopped rc RUNLEVEL=[2345]

env ACTIVE_IAXFAX=”ttyIAX0 ttyIAX1 ttyIAX2 ttyIAX3 ttyIAX4 ttyIAX5 ttyIAX6 ttyIAX7 ttyIAX8 ttyIAX9″
task
script
. /etc/sysconfig/init
for ttyIAX in $(echo $ACTIVE_IAXFAX) ; do
initctl start iaxmodem TTY=$ttyIAX
done
end script

Maximus Peters - 2014-08-14 11:03:35
but how do we get hylafax to autostart? can we compare notes on that too?
Maximus Peters - 2014-08-14 11:01:50
very interesting and useful article for hylafax on centos6
Vytis - 2014-05-10 17:07:33
Hi, This put me on the right track. Thanks for posting.
Fabio Ribeiro - 2013-09-30 14:54:21
Hi. I ran into the same issue: respawning too fast. Do you remember the solution? Thanks
Steve Walker - 2012-12-17 18:56:38
I just found this and it is exactly what I need. The faxgettys start, but iaxmodem doesn't. The logs show that it is "respawning too fast."

Running Centos 6.2. Any ideas?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>