#!/bin/sh # # $FreeBSD$ # PATH=/bin:/usr/bin:/usr/sbin pkgname=$1 gnugk_user=gnugk gnugk_group=gnugk gnugk_config=${PKG_PREFIX:-"/usr/local"}/etc/gnugk.ini gnugk_logdir="/var/log/gnugk" gnugk_piddir="/var/run/gnugk" case $2 in PRE-INSTALL) echo "===> Pre-installation configuration for ${pkgname}" for dir in ${gnugk_logdir} ${gnugk_piddir}; do if [ ! -d ${dir} ]; then echo "Creating ${dir}..." install -d -o ${gnugk_user} -g ${gnugk_group} \ -m 0750 ${dir} fi done ;; POST-INSTALL) if [ ! -f ${gnugk_config} \ -a -f ${gnugk_config}.default ]; then echo "Creating ${gnugk_config} from default..." install -c -o root -g ${gnugk_group} -m 0640 \ ${gnugk_config}.default \ ${gnugk_config} fi echo "===> Post-installation informations for ${pkgname}" echo "" echo " o A sample configuration file for this package is installed" echo " as ${gnugk_config}." echo " More example configurations can be found in" echo " ${PKG_PREFIX}/share/examples/openh323/gatekeeper." echo "" echo " o Documentation can be found in" echo " ${PKG_PREFIX}/share/doc/openh323/gatekeeper." echo "" echo " o A log directory has been created in ${gnugk_logdir}." echo "" echo " To enable gatekeeper, set gnugk_enable=yes in either" echo " /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/gnugk" echo " See ${PKG_PREFIX}/etc/rc.d/gnugk.sh for more" echo " configuration options." echo "" ;; *) exit 64 ;; esac exit 0