mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
v-install-wordpress: Check if MariaDB allows long database name
This commit is contained in:
parent
a28436e6e8
commit
e0b90ef9d6
1 changed files with 6 additions and 1 deletions
|
@ -26,6 +26,7 @@ USER=$user
|
||||||
# Includes
|
# Includes
|
||||||
source /usr/local/vesta/func/main.sh
|
source /usr/local/vesta/func/main.sh
|
||||||
source /usr/local/vesta/func/db.sh
|
source /usr/local/vesta/func/db.sh
|
||||||
|
source /usr/local/vesta/conf/vesta.conf
|
||||||
|
|
||||||
if [ -z "$user" ]; then
|
if [ -z "$user" ]; then
|
||||||
check_result $E_NOTEXIST "domain $domain doesn't exist"
|
check_result $E_NOTEXIST "domain $domain doesn't exist"
|
||||||
|
@ -49,7 +50,11 @@ is_object_unsuspended 'user' 'USER' "$user"
|
||||||
source /usr/local/vesta/func/handle_parameters.sh
|
source /usr/local/vesta/func/handle_parameters.sh
|
||||||
|
|
||||||
if [ -z "$database" ]; then
|
if [ -z "$database" ]; then
|
||||||
database=$(echo "$domain" | sed 's#\.#_#g')
|
if [ ! -z "$MAX_DBUSER_LEN" ] && [ "$MAX_DBUSER_LEN" -ge 80 ]; then
|
||||||
|
database=$(echo "$domain" | sed 's#\.#_#g')
|
||||||
|
else
|
||||||
|
database="wp"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$email" ]; then
|
if [ -z "$email" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue