freebsd-ports/databases/phpmyadmin/files/pkg-install.in
Matthew Seaman 7a7eb0c54c - stagify
- move post-install actions into pkg-install
2013-09-27 16:08:12 +00:00

36 lines
612 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
WWWDIR=%%WWWDIR%%
SUPHP_ENABLED=%%SUPHP_ENABLED%%
CFG_FILE=%%CFG_FILE%%
pma_usr=%%PMA_USR%%
pma_grp=%%PMA_GRP%%
case $2 in
POST-INSTALL)
# If suPHP is in use, change ownership of the phpMyAdm
# directory
if [ ! -z ${SUPHP_ENABLED} ] ; then
echo "===> Adjusting file ownership in $WWWDIR"
chown -R $pma_usr:$pma_grp $WWWDIR || exit 1
fi
# Install the config file if it doesn't exist
if [ ! -f ${CFG_FILE} ] ; then
cp -p ${CFG_FILE}.sample ${CFG_FILE}
fi
;;
esac
#
# That's All Folks!
#