diff options
author | Dirk Froemberg <dirk@FreeBSD.org> | 1999-07-04 14:55:14 +0000 |
---|---|---|
committer | Dirk Froemberg <dirk@FreeBSD.org> | 1999-07-04 14:55:14 +0000 |
commit | f154bc0b9c63df6e5826c814f6bbd14f27c6c9fc (patch) | |
tree | 5a0e3cfe10281daf17796e214195168b03d5dd84 /databases/mysql41-server/pkg-install | |
parent | Update to 2.8.2.rel1. (diff) |
- install gifs for HTML documentation
- put mysqld in a sandbox:
- create user and group 'mysql' (uid and gid 88)
- start mysqld with user 'mysql'
Notes
Notes:
svn path=/head/; revision=19992
Diffstat (limited to 'databases/mysql41-server/pkg-install')
-rw-r--r-- | databases/mysql41-server/pkg-install | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/databases/mysql41-server/pkg-install b/databases/mysql41-server/pkg-install new file mode 100644 index 000000000000..1c5dd869d825 --- /dev/null +++ b/databases/mysql41-server/pkg-install @@ -0,0 +1,38 @@ +#!/bin/sh + +PATH=/usr/sbin + +case $2 in +POST-INSTALL) + USER=mysql + GROUP=${USER} + UID=88 + GID=${UID} + + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d /var/db/mysql -s /sbin/nologin -c "MySQL Daemon" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + chown -R ${USER}.${GROUP} /var/db/mysql + ;; +esac |