summaryrefslogtreecommitdiffstats
path: root/databases/mysql50-server
diff options
context:
space:
mode:
Diffstat (limited to 'databases/mysql50-server')
-rw-r--r--databases/mysql50-server/pkg-install7
1 files changed, 7 insertions, 0 deletions
diff --git a/databases/mysql50-server/pkg-install b/databases/mysql50-server/pkg-install
index 3e92502..42682fe 100644
--- a/databases/mysql50-server/pkg-install
+++ b/databases/mysql50-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"
OpenPOWER on IntegriCloud