bug fix for no socket auth

This commit is contained in:
2025-11-23 14:19:28 +00:00
parent fb2980c143
commit c013d1559c

View File

@@ -173,6 +173,17 @@ cp "$wptarget/wp-config-sample.php" "$wptarget/wp-config.php"
sed -i "s/database_name_here/$dbname/" "$wptarget/wp-config.php"
sed -i "s/username_here/$dbuser/" "$wptarget/wp-config.php"
sed -i "s/password_here/$dbpass/" "$wptarget/wp-config.php"
#
# Adjust WordPress DB_HOST depending on Database auth type
#
if [[ "$socketauth" == "no" ]]; then
sed -i "s/^define( 'DB_HOST'.*/define( 'DB_HOST', '127.0.0.1' );/" "$wptarget/wp-config.php"
fi
#
# Set permisions on Wordpress directory
#
chown -R www-data: "$wptarget"
#
@@ -276,7 +287,7 @@ printf '%s\n' "$wpnotice"
#
# All done
#
printf "\nAll Done — WordPress files located at: %s\n" "$wptarget"
printf "\nAll Done...\n"
#
# End of script