Browse Source
replace db_prefix in the install script
pull/141/head
Kay0u
5 years ago
No known key found for this signature in database
GPG Key ID: AAFEEB16CFA2AE2D
1 changed files with
4 additions and
0 deletions
-
scripts/install
|
|
|
@ -202,12 +202,16 @@ then |
|
|
|
# Activate multisite in wordpress config |
|
|
|
ynh_replace_string --match_string="//--MULTISITE2--define" --replace_string="define" --target_file=$final_path/wp-config.php |
|
|
|
|
|
|
|
db_prefix="wp_" |
|
|
|
ynh_replace_string --match_string="__DB_PREFIX__" --replace_string="$db_prefix" --target_file=../conf/sql/multisite.sql |
|
|
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file=../conf/sql/multisite.sql |
|
|
|
ynh_replace_string --match_string="__LENGTH__" --replace_string="$((${#app} + 95))" --target_file=../conf/sql/multisite.sql |
|
|
|
|
|
|
|
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/multisite.sql |
|
|
|
plugin_network="--network" |
|
|
|
else |
|
|
|
db_prefix="wp_" |
|
|
|
ynh_replace_string --match_string="__DB_PREFIX__" --replace_string="$db_prefix" --target_file=../conf/sql/single.sql |
|
|
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file=../conf/sql/single.sql |
|
|
|
ynh_replace_string --match_string="__LENGTH__" --replace_string="$((${#app} + 95))" --target_file=../conf/sql/single.sql |
|
|
|
|
|
|
|
|