#! /bin/bash # $Id: hylafax.in 791 2008-02-11 18:53:33Z faxguy $ # # chkconfig: 2345 97 05 # # description: HylaFAX(tm) is a sophisticated enterprise-strength fax # package for class 1 and 2 fax modems on unix systems. # This init script is the preferred way to start HylaFAX, # but does not, by default, activate any modems. Consult # the faxgetty(8) and faxmodem(8) man pages for more info. # # Warning, this file was automatically created by the HylaFAX configure script # # HylaFAX Facsimile Software # # Copyright (c) 1990-1996 Sam Leffler # Copyright (c) 1991-1996 Silicon Graphics, Inc. # HylaFAX is a trademark of Silicon Graphics # # Permission to use, copy, modify, distribute, and sell this software and # its documentation for any purpose is hereby granted without fee, provided # that (i) the above copyright notices and this permission notice appear in # all copies of the software and related documentation, and (ii) the names of # Sam Leffler and Silicon Graphics may not be used in any advertising or # publicity relating to the software without the specific, prior written # permission of Sam Leffler and Silicon Graphics. # # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. # # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # # VERSION: 7.0.3 # DATE: Fri Jul 31 22:38:20 UTC 2020 # TARGET: i686-pc-linux-gnu # # # fax server control # # NB: This script assumes faxgetty processes are managed by init # SPOOL=/var/spool/hylafax DIR_LIBDATA=/etc/hylafax # # Older versions put setup.cache and setup.modem in the spool/etc directory, # but for security purposes in preventing uucp from getting root privileges # this script now looks for those files in $DIR_LIBDATA and normally the # files will be hard linked between the two locations. The following logic # is to accommodate upgrades where the files are only in the spool/etc # directory. # if [ -e $SPOOL/etc/setup.cache ] && [ ! -e $DIR_LIBDATA/setup.cache ]; then ln $SPOOL/etc/setup.cache $DIR_LIBDATA/setup.cache fi if [ -e $SPOOL/etc/setup.modem ] && [ ! -e $DIR_LIBDATA/setup.modem ]; then ln $SPOOL/etc/setup.modem $DIR_LIBDATA/setup.modem fi test -f $DIR_LIBDATA/setup.cache || { cat</dev/null 2>&1 killall -15 hfaxd } case $1 in 'start') do_start ;; 'stop') do_stop ;; 'restart') do_stop sleep 2 #wait some time... do_start ;; 'start_msg') $ECHO "Starting HylaFAX Servers." ;; 'stop_msg') $ECHO "Stopping HylaFAX Servers." ;; *) $ECHO "usage: hylafax {start|stop|restart|start_msg|stop_msg}" ;; esac