mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
e24792fc91
Use UIDs/GIDs infractructure (new uid/gid 226) PR: ports/165103 Approved by: maintainer
39 lines
966 B
Bash
39 lines
966 B
Bash
#! /bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
|
|
PATH=/bin:/usr/bin:/usr/sbin
|
|
|
|
case $2 in
|
|
|
|
POST-INSTALL)
|
|
|
|
echo "---> Starting install script:"
|
|
|
|
if [ -z "%%USER%%" -o -z "%%GROUP%%" ]; then
|
|
echo "ERROR: A required pragma was empty"
|
|
exit 1
|
|
fi
|
|
|
|
# Create home directory if required
|
|
if [ -d "%%DATADIR%%" ]; then
|
|
echo "---> Using existing Sqlgrey database directory (%%DATADIR%%)"
|
|
echo " (There may be existing active sqlgrey databases - this installation"
|
|
echo " will attempt to preserve them.)"
|
|
else
|
|
echo "---> Creating Sqlgrey database directory (%%DATADIR%%)"
|
|
(umask 002 && /bin/mkdir -p "%%DATADIR%%") || exit 1
|
|
/usr/sbin/chown -R "%%USER%%:%%GROUP%%" "%%DATADIR%%" || exit 1
|
|
/bin/chmod g+s "%%DATADIR%%" || exit 1
|
|
fi
|
|
;;
|
|
|
|
POST-DEINSTALL)
|
|
|
|
echo "---> Please, remember to remove the database directory:"
|
|
echo " %%DATADIR%%"
|
|
echo " If you're only updating, you can leave the things as they are."
|
|
;;
|
|
|
|
esac
|