mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Update package
This commit is contained in:
parent
f74bd8f484
commit
4cd2060c63
3 changed files with 27 additions and 15 deletions
|
@ -14,11 +14,12 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
|
upgrade=1 from_commit=cbb74263e33deb0ec36f99886a2f773e36d40fd9
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
incorrect_path=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=0
|
change_url=1
|
||||||
;; Test avec multisite
|
;; Test avec multisite
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
|
@ -45,8 +46,7 @@
|
||||||
Level 3=auto
|
Level 3=auto
|
||||||
# Level 4: https://github.com/YunoHost-Apps/wordpress_ynh/blob/master/conf/sql/single.sql#L1
|
# Level 4: https://github.com/YunoHost-Apps/wordpress_ynh/blob/master/conf/sql/single.sql#L1
|
||||||
Level 4=1
|
Level 4=1
|
||||||
# Level 5: https://github.com/YunoHost-Apps/wordpress_ynh/issues/18
|
Level 5=auto
|
||||||
Level 5=1
|
|
||||||
Level 6=auto
|
Level 6=auto
|
||||||
Level 7=auto
|
Level 7=auto
|
||||||
Level 8=0
|
Level 8=0
|
||||||
|
@ -55,3 +55,7 @@
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=down
|
Notification=down
|
||||||
|
;;; Upgrade options
|
||||||
|
; commit=cbb74263e33deb0ec36f99886a2f773e36d40fd9
|
||||||
|
name=Upgrade 4.8
|
||||||
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr_FR&multisite=0&is_public=1&
|
||||||
|
|
|
@ -33,3 +33,19 @@ CHECK_SIZE () { # Vérifie avant chaque backup que l'espace est suffisant
|
||||||
ynh_die "Espace nécessaire: $(HUMAN_SIZE $backup_size)"
|
ynh_die "Espace nécessaire: $(HUMAN_SIZE $backup_size)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
#============= FUTURE YUNOHOST HELPER ============
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Delete a file checksum from the app settings
|
||||||
|
#
|
||||||
|
# $app should be defined when calling this helper
|
||||||
|
#
|
||||||
|
# usage: ynh_remove_file_checksum file
|
||||||
|
# | arg: file - The file for which the checksum will be deleted
|
||||||
|
ynh_delete_file_checksum () {
|
||||||
|
local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_'
|
||||||
|
ynh_app_setting_delete $app $checksum_setting_name
|
||||||
|
}
|
||||||
|
|
|
@ -114,8 +114,6 @@ cp ../conf/wp-config.php $final_path/wp-config.php
|
||||||
# Change variables in Wordpress configuration
|
# Change variables in Wordpress configuration
|
||||||
ynh_replace_string "__DB_USER__" "$db_name" $final_path/wp-config.php
|
ynh_replace_string "__DB_USER__" "$db_name" $final_path/wp-config.php
|
||||||
ynh_replace_string "__DB_PWD__" "$db_pwd" $final_path/wp-config.php
|
ynh_replace_string "__DB_PWD__" "$db_pwd" $final_path/wp-config.php
|
||||||
ynh_replace_string "__DOMAIN__" "$domain" $final_path/wp-config.php
|
|
||||||
ynh_replace_string "__PATH__" "$path_url" $final_path/wp-config.php
|
|
||||||
|
|
||||||
for i in 1 2 3 4 5 6 7 8
|
for i in 1 2 3 4 5 6 7 8
|
||||||
do
|
do
|
||||||
|
@ -168,14 +166,6 @@ $wpcli_alias plugin install simple-ldap-login
|
||||||
$wpcli_alias plugin install http-authentication
|
$wpcli_alias plugin install http-authentication
|
||||||
$wpcli_alias plugin install companion-auto-update
|
$wpcli_alias plugin install companion-auto-update
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# LOAD SQL CONFIG
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Replace variables in sql scripts
|
|
||||||
ynh_replace_string "__DOMAIN_PATH__" "$domain$path_url" ../conf/sql/*.sql
|
|
||||||
ynh_replace_string "__DATE__" "$(date +%s)" ../conf/sql/*.sql
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SET LANGUAGE
|
# SET LANGUAGE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -200,17 +190,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
|
||||||
|
|
Loading…
Add table
Reference in a new issue