Update deploy.sh

This commit is contained in:
12nick12 2020-01-12 15:13:12 -05:00 committed by GitHub
parent 1cda146fa2
commit 1d7b963e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,8 @@ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/${sit
create_wp_db () {
siteNoP=$(echo "${siteURL}" | sed 's/\.//g')
# create wordpress user with passwd
wpasswd=$(openssl rand 39 -base64 | cut -c10-30)
wpapasswd=$(openssl rand 39 -base64 | cut -c15-37)
wpasswd=$(openssl rand 39 -base64 | cut -c1-37)
wpapasswd=$(openssl rand 39 -base64 | cut -c1-37)
mysql -e "create database ${siteNoP}"
mysql -e "grant all on ${siteNoP}.* to ${siteNoP}@localhost identified by '${wpasswd}'"
}