diff options
author | dirk <dirk@FreeBSD.org> | 2000-12-01 07:42:41 +0800 |
---|---|---|
committer | dirk <dirk@FreeBSD.org> | 2000-12-01 07:42:41 +0800 |
commit | c65215b74e702f290942a7079b1a58b51a3535d7 (patch) | |
tree | b0a7a1a8bdb51d091050e6a0360cd49492a55917 /databases/mysql40-server/pkg-install | |
parent | f415e19f4ee79b1d4bd6d3a8f8369b80d020d1c4 (diff) | |
download | freebsd-ports-gnome-c65215b74e702f290942a7079b1a58b51a3535d7.tar.gz freebsd-ports-gnome-c65215b74e702f290942a7079b1a58b51a3535d7.tar.zst freebsd-ports-gnome-c65215b74e702f290942a7079b1a58b51a3535d7.zip |
Adjust mysql's homedirectory if already exists.
Diffstat (limited to 'databases/mysql40-server/pkg-install')
-rw-r--r-- | databases/mysql40-server/pkg-install | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/databases/mysql40-server/pkg-install b/databases/mysql40-server/pkg-install index 3e925021ede1..42682fea5aff 100644 --- a/databases/mysql40-server/pkg-install +++ b/databases/mysql40-server/pkg-install @@ -25,6 +25,13 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." + if pw usermod ${USER} -d ${DB_DIR} + then + echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" + else + echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." + exit 1 + fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" |