mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Merge pull request #37 from YunoHost-Apps/fix_ldap_plugin
Fix ldap multisite
This commit is contained in:
commit
a3a8d62e9e
2 changed files with 7 additions and 3 deletions
|
@ -200,17 +200,19 @@ then
|
||||||
ynh_replace_string "//--MULTISITE2--define" "define" $final_path/wp-config.php
|
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
|
ynh_mysql_connect_as $db_name $db_pwd $db_name < ../conf/sql/multisite.sql
|
||||||
|
plugin_network="--network"
|
||||||
else
|
else
|
||||||
ynh_mysql_connect_as $db_name $db_pwd $db_name < ../conf/sql/single.sql
|
ynh_mysql_connect_as $db_name $db_pwd $db_name < ../conf/sql/single.sql
|
||||||
|
plugin_network=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ACTIVATE WORDPRESS' PLUGINS
|
# ACTIVATE WORDPRESS' PLUGINS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
$wpcli_alias plugin activate simple-ldap-login
|
$wpcli_alias plugin activate simple-ldap-login $plugin_network
|
||||||
# Do not activate http-authentication, this plugin is sometimes unstable
|
# Do not activate http-authentication, this plugin is sometimes unstable
|
||||||
$wpcli_alias plugin activate companion-auto-update
|
$wpcli_alias plugin activate companion-auto-update $plugin_network
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# 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 ]
|
if [ $multisite -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_replace_string "#--MULTISITE--" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "#--MULTISITE--" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
plugin_network="--network"
|
||||||
else
|
else
|
||||||
multisite=0
|
multisite=0
|
||||||
|
plugin_network=""
|
||||||
if [ $is_public -eq 0 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
ynh_replace_string "#--PRIVATE--" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "#--PRIVATE--" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
@ -151,7 +153,7 @@ update_plugin () {
|
||||||
}
|
}
|
||||||
update_plugin simple-ldap-login
|
update_plugin simple-ldap-login
|
||||||
update_plugin companion-auto-update
|
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
|
# Disable broken plugin http-authentication
|
||||||
$wpcli_alias plugin is-installed http-authentication && $wpcli_alias plugin deactivate http-authentication
|
$wpcli_alias plugin is-installed http-authentication && $wpcli_alias plugin deactivate http-authentication
|
||||||
|
|
Loading…
Add table
Reference in a new issue