#
# $Id: postinstall.in,v 1.4 2003/01/24 06:29:17 tim Exp $
#	Tim Rice
#
#	postinstall
#
#cd /usr/local/HylaFAX-v4.0
#sh make.links

if test -f @LIBDATA@/faxcover.ps
then
	mv @LIBDATA@/faxcover.ps.dist @LIBDATA@/faxcover.ps.N
	installf HylaFAX @LIBDATA@/faxcover.ps.N f 0644 @SYSUID@ @SYSGID@
else
	mv @LIBDATA@/faxcover.ps.dist @LIBDATA@/faxcover.ps
	installf HylaFAX @LIBDATA@/faxcover.ps f 0644 @SYSUID@ @SYSGID@
fi
removef HylaFAX @LIBDATA@/faxcover.ps.dist

if test -d @SPOOL@/recvq
then
	echo "\n\nRun @SBIN@/faxsetup\n"
	cat >/tmp/root.crontab <<EOF
#	crontab(1)
# (minutes) (hour) (day of the month) (month of the year) (day of the week)
# faxqclean - HylaFAX queue cleaner process
0   0    *    *    *   @SBIN@/faxqclean
EOF

	cat >/tmp/uucp.crontab <<EOF
#	crontab(1)
# (minutes) (hour) (day of the month) (month of the year) (day of the week)
# faxcron - HylaFAX routine maintenance script
25   23    *    *    0   sh @SBIN@/faxcron -rcv 20 | mailx -s "Fax Reports" FaxMaster
EOF

	echo "See sample crontab(1) entries for root and fax (uucp)"
	echo "/tmp/root.crontab"
	echo "/tmp/uucp.crontab"

else
	echo "\n\nRun @SBIN@/faxsetup -client\n"
fi

# update software database
installf -f HylaFAX
removef -f HylaFAX

exit 0
