mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
commit
5afdbcb8c2
3 changed files with 11 additions and 9 deletions
|
@ -1 +0,0 @@
|
|||
INSERT INTO wp_options VALUES('','http_authentication_options','a:8:{s:13:"allow_wp_auth";b:1;s:10:"auth_label";s:19:"HTTP authentication";s:9:"login_uri";s:40:"https://__DOMAIN_PATH__/wp-login.php";s:10:"logout_uri";s:28:"https://__DOMAIN_PATH__/";s:22:"additional_server_keys";s:13:"PHP_AUTH_USER";s:24:"auto_create_email_domain";s:0:"";s:10:"db_version";i:2;s:16:"auto_create_user";b:0;}','yes');
|
|
@ -176,9 +176,6 @@ $wpcli_alias plugin install companion-auto-update
|
|||
ynh_replace_string "__DOMAIN_PATH__" "$domain$path_url" ../conf/sql/*.sql
|
||||
ynh_replace_string "__DATE__" "$(date +%s)" ../conf/sql/*.sql
|
||||
|
||||
# Charge les commandes sql communes à tous les scripts.
|
||||
ynh_mysql_connect_as $db_name $db_pwd $db_name < ../conf/sql/common.sql
|
||||
|
||||
#=================================================
|
||||
# SET LANGUAGE
|
||||
#=================================================
|
||||
|
@ -203,17 +200,19 @@ then
|
|||
ynh_replace_string "//--MULTISITE2--define" "define" $final_path/wp-config.php
|
||||
|
||||
ynh_mysql_connect_as $db_name $db_pwd $db_name < ../conf/sql/multisite.sql
|
||||
plugin_network="--network"
|
||||
else
|
||||
ynh_mysql_connect_as $db_name $db_pwd $db_name < ../conf/sql/single.sql
|
||||
plugin_network=""
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# ACTIVATE WORDPRESS' PLUGINS
|
||||
#=================================================
|
||||
|
||||
$wpcli_alias plugin activate simple-ldap-login
|
||||
$wpcli_alias plugin activate http-authentication
|
||||
$wpcli_alias plugin activate companion-auto-update
|
||||
$wpcli_alias plugin activate simple-ldap-login $plugin_network
|
||||
# Do not activate http-authentication, this plugin is sometimes unstable
|
||||
$wpcli_alias plugin activate companion-auto-update $plugin_network
|
||||
|
||||
#=================================================
|
||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||
|
|
|
@ -129,8 +129,10 @@ ynh_backup_if_checksum_is_different "$final_path/wp-config.php"
|
|||
if [ $multisite -eq 1 ]
|
||||
then
|
||||
ynh_replace_string "#--MULTISITE--" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
plugin_network="--network"
|
||||
else
|
||||
multisite=0
|
||||
plugin_network=""
|
||||
if [ $is_public -eq 0 ]
|
||||
then
|
||||
ynh_replace_string "#--PRIVATE--" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
@ -150,9 +152,11 @@ update_plugin () {
|
|||
( $wpcli_alias plugin is-installed $1 && $wpcli_alias plugin update $1 ) || $wpcli_alias plugin install $1
|
||||
}
|
||||
update_plugin simple-ldap-login
|
||||
update_plugin http-authentication
|
||||
update_plugin companion-auto-update
|
||||
$wpcli_alias plugin activate companion-auto-update
|
||||
$wpcli_alias plugin activate companion-auto-update $plugin_network
|
||||
|
||||
# Disable broken plugin http-authentication
|
||||
$wpcli_alias plugin is-installed http-authentication && $wpcli_alias plugin deactivate http-authentication
|
||||
|
||||
#=================================================
|
||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||
|
|
Loading…
Add table
Reference in a new issue