3 # hylafax, v 1.2 2001/01/10 Christian Zoffoli <czoffoli@linux-mandrake.com>
5 # chkconfig: 12345 97 05
6 # description: HylaFAX(tm) is a sophisticated enterprise-strength fax \
7 # package for class 1 and 2 fax modems on unix systems. \
8 # This init script is the preferred way to start HylaFAX,\
9 # but does not, by default, activate any modems. Consult \
10 # the faxgetty(8) and faxmodem(8) man pages for more info.
15 # Source networking configuration.
16 . /etc/sysconfig/network
18 # Check that networking is up.
19 [ ${NETWORKING} = "no" ] && exit 0
21 # Source function library.
22 if [ -f /etc/init.d/functions ] ; then
23 . /etc/init.d/functions
24 elif [ -f /etc/rc.d/init.d/functions ] ; then
25 . /etc/rc.d/init.d/functions
32 echo -n -e "HylaFAX ERROR (old setup.cache) please run faxsetup -server\n"
36 if [ $1 = "yes" -o $1 = "1" ]; then
43 test -f $SPOOL/etc/setup.cache || {
46 HylaFAX FATAL ERROR: $SPOOL/etc/setup.cache is missing!
48 The file $SPOOL/etc/setup.cache is not present.
49 This probably means the machine has not been setup using the
50 faxsetup(1M) command. Read the documentation on setting up
51 HylaFAX before you startup a server system.
60 . $SPOOL/etc/setup.cache
71 if checkvar $HFAXD_OLD_PROTOCOL
77 if checkvar $HFAXD_SNPP_SERVER
80 if [ "$OUT" != "" ]; then
91 if checkvar $FAXQ_SERVER
93 echo -n "Starting HylaFAX queue manager: "
98 echo -n "HylaFAX queue manager not started. "
101 if checkvar $HFAXD_SERVER
103 echo -n "Starting HylaFAX server: "
109 echo -n "HylaFAX server not started. "
112 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/hylafax || RETVAL=1
121 echo -n "Shutting down HylaFAX queue manager: "
122 /usr/sbin/faxquit >/dev/null 2>&1
126 echo -n "Shutting down HylaFAX server: "
131 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/hylafax || RETVAL=1
136 if pidofproc faxgetty > /dev/null
140 echo -n -e "Restarting FaxGetty...\n"
161 check_config || exit 1
177 [ -f /var/lock/subsys/hylafax ] && restart
183 echo "Usage: $0 { start | stop | status | restart | condrestart | faxgettyreset }"