#!/sbin/sh
#
# ident	"@(#)fc-cache.init	1.2	04/06/10 SMI"
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

# Build cache files for fontconfig to speed startup of fontconfig
# clients such as J2SE 1.5 and GNOME 2.4 and later versions

case "$1" in
'start')
    if [ -x /usr/bin/fc-cache ] ; then
	/usr/bin/fc-cache &
    fi
    if [ ! -f /var/tmp/stsf/stsf.pfc -a -x /usr/lib/ST/stfontserverd ] ; then
        /usr/lib/ST/stfontserverd
    fi
    ;;

'stop')
    exit 0
    ;;
*)
    echo "Usage: $0 { start | stop }"
    exit 1
    ;;
esac
exit 0
