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 . /etc/rc.d/init.d/functions
26 echo -n -e "HylaFAX ERROR (old setup.cache) please run faxsetup -server\n"
30 if [ $1 = "yes" -o $1 = "1" ]; then
37 test -f $SPOOL/etc/setup.cache || {
40 HylaFAX FATAL ERROR: $SPOOL/etc/setup.cache is missing!
42 The file $SPOOL/etc/setup.cache is not present.
43 This probably means the machine has not been setup using the
44 faxsetup(1M) command. Read the documentation on setting up
45 HylaFAX before you startup a server system.
54 . $SPOOL/etc/setup.cache
64 if checkvar "$HFAXD_OLD_PROTOCOL"; then
69 if checkvar "$HFAXD_SNPP_SERVER"; then
81 if checkvar "$FAXQ_SERVER"; then
82 msg_starting "HylaFAX queue manager"
87 if checkvar "$HFAXD_SERVER"; then
89 [ -n "$OUT" ] && msg="$msg $OUT"
90 msg_starting "HylaFAX server"
95 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/hylafax || RETVAL=1
99 # stop can't return failure by LSB. so make these vars local
103 msg_stopping "HylaFAX queue manager"
104 daemon /usr/sbin/faxquit
107 msg_stopping "HylaFAX server"
111 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/hylafax
115 if pidofproc faxgetty > /dev/null; then
116 msg_starting "FaxGetty restart process"
118 msg_starting "FaxGetty restart process (init reload)"
135 return $(($RETVAL + $?))
138 check_config || exit 1
156 [ -f /var/lock/subsys/hylafax ] && restart
162 echo "Usage: $0 { start | stop | status | restart | condrestart | faxgettyreset }"