pkgsrc-wip/hylafax/files/hylafax.sh
Andreas Hallmann 920ed39009 Hylafax is an enterprise class fax server software.
hylafax is a release spin off from wip/hylafax-devel.
hylafax will stay with releases and get imports
to its (cvs speek) vendor branch, whenever hylafax-devel reaches the next release.
It is thought as the hylafax source for pkgsrc-imports.

hylafax-devel will continue to be a testbed for the next release.
2006-05-20 15:29:28 +00:00

35 lines
655 B
Bash
Executable file

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: hylafax.sh,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
#
# PROVIDE: hylafax
# REQUIRE: DAEMON
command=${1:-start}
case ${command} in
start)
if [ -x @PREFIX@/libexec/hfaxd -a -f /var/spool/hylafax/etc/config ] ; then
echo -n 'Starting hfaxd'
@PREFIX@/libexec/hfaxd -i 4559 -o 4557 -s 444
echo ' faxq.'
@PREFIX@/sbin/faxq
fi
;;
stop)
PIDS=`ps -ax -o pid,command|egrep '[ /](faxq|hfaxd) '|awk '{printf " " $1}'`
if [ -n "$PIDS" ];then
echo "Stopping hylafax pids$PIDS."
kill -TERM $PIDS
else
echo "hylafax not running?"
fi
;;
restart)
( $0 stop )
sleep 1
$0 start
;;
esac
exit 0