Update install_wordpress_vestacp
This commit is contained in:
parent
2d2eea2136
commit
9e3b559d91
@ -29,8 +29,10 @@ DB_PREFIX=$(echo $DOMAIN_NAME | cut -c1-3)
|
|||||||
# Truncate the username to ensure the total length does not exceed 16 characters
|
# Truncate the username to ensure the total length does not exceed 16 characters
|
||||||
MAX_USERNAME_LENGTH=16
|
MAX_USERNAME_LENGTH=16
|
||||||
TRUNCATED_USERNAME=$(echo "$USERNAME" | cut -c1-10) # Limit to 10 characters
|
TRUNCATED_USERNAME=$(echo "$USERNAME" | cut -c1-10) # Limit to 10 characters
|
||||||
DB_NAME="${TRUNCATED_USERNAME}_${DB_PREFIX}_db" # Construct database name
|
|
||||||
DB_USER="${TRUNCATED_USERNAME}_${DB_PREFIX}_usr" # Construct database user
|
# Construct database name and user without the last two parts
|
||||||
|
DB_NAME="${TRUNCATED_USERNAME}_${DB_PREFIX}" # Construct database name
|
||||||
|
DB_USER="${TRUNCATED_USERNAME}_${DB_PREFIX}" # Construct database user
|
||||||
|
|
||||||
# Ensure the database name and user do not exceed 16 characters
|
# Ensure the database name and user do not exceed 16 characters
|
||||||
if [ ${#DB_NAME} -gt $MAX_USERNAME_LENGTH ]; then
|
if [ ${#DB_NAME} -gt $MAX_USERNAME_LENGTH ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user