Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 44d88a0

Browse files
authoredNov 26, 2019
Merge pull request #129 from ocf/wp-automatic-db-pass
makeservices: makemysql automatic wp db pass
2 parents 8891fc0 + 1b88f43 commit 44d88a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎makeservices/makemysql

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ if [[ "$(hostname)" != "tsunami" && "$(hostname)" != "dev-tsunami" ]]; then
33
echo -e '\033[1;31mYou must run this command on tsunami.\033[0m'
44
exit 1
55
fi
6-
sudo -u mysql /opt/share/utils/makeservices/makemysql-real
6+
7+
PASS=$(sudo -u mysql /opt/share/utils/makeservices/makemysql-real | tee /dev/tty | tail -n 1 | grep -Po '(?<=: )([0-9a-zA-Z]){24,}$')
8+
9+
echo 'Changing WordPress database password'
10+
cd ~/public_html/
11+
wp config set DB_PASSWORD "$PASS" > /dev/null

0 commit comments

Comments
 (0)
Please sign in to comment.