#!/bin/sh
#
# Config files: 
#  /opt/csw/etc/fontconfig/fonts.conf
#  /opt/csw/etc/fontconfig/conf.d/
# 
# Cache files:
#  .fonts.cache-csw-1 (does not conflict with SUNWfontconfig[-root])
#
PRG=/opt/csw/bin/fc-cache

case "$1" in

 start)
     $PRG -s &
     if [ $? -ne 0 ]; then
        echo "Error: could not start $PRG"
     else
        echo "fc-cache running in background ..."
     fi
     ;;

 force)
     $PRG -s -f &
     if [ $? -ne 0 ]; then
        echo "Error: could not start $PRG"
     else
        echo "fc-cache running in background ..."
     fi
     ;;

 stop)
     # dummy
     ;;

 *)
     echo "Usage: $0 {start|force}"
     exit 1
     ;;

esac

exit 0
