File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ if [ ! -d $MYSQLDIR/mysql ]; then
1616 echo " WARNING: Expected the directory $MYSQLDIR /mysql/ to exist -- have you downloaded and unpacked the IETF binary database tarball?"
1717fi
1818
19+ echo " Setting up the 'mysql' user for database file access ..."
20+ MYSQL_TARGET_GID=$( stat -c " %g" $MYSQLDIR /mysql)
21+ if ! grep -q " :$MYSQL_TARGET_GID :$" /etc/group; then
22+ groupadd -g $MYSQL_TARGET_GID mysqldata
23+ fi
24+ usermod -a -G $MYSQL_TARGET_GID mysql
25+
1926echo " Checking if MySQL is running ..."
2027if ! /etc/init.d/mysql status; then
2128 echo " Starting mysql ..."
5461
5562if ! id -u " $USER " & > /dev/null; then
5663 echo " Creating user '$USER ' ..."
57- useradd -s /bin/bash -G staff $USER
64+ useradd -s /bin/bash -G staff,sudo $USER
65+ echo " $USER :$USER " | chpasswd
5866fi
5967
6068VIRTDIR=" /opt/home/$USER /$TAG "
You can’t perform that action at this time.
0 commit comments