1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wordpress_ynh.git synced 2024-09-03 20:36:10 +02:00

Merge pull request #226 from YunoHost-Apps/testing

testing
This commit is contained in:
Éric Gaspar 2023-08-14 21:11:14 +02:00 committed by GitHub
commit 7dd21b730a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 97 deletions

View file

@ -20,7 +20,7 @@ WordPress is open source software you can use to create a beautiful website, blo
With this package, you can even activate the [multisite](https://wordpress.org/support/article/glossary/#multisite) option.
**Shipped version:** 6.2.2~ynh1
**Shipped version:** 6.3.0~ynh1
## Screenshots

View file

@ -20,7 +20,7 @@ WordPress est un logiciel libre que vous pouvez utiliser pour créer un site ou
Avec ce package, vous pouvez même activer l'option [multisite](https://codex.wordpress.org/Glossary#Multisite).
**Version incluse :** 6.2.2~ynh1
**Version incluse :** 6.3.0~ynh1
## Captures décran

View file

@ -1,47 +0,0 @@
;; Test complet sans multisite
; Manifest
domain="domain.tld"
path="/path"
is_public=1
language="fr_FR"
admin="john"
multisite=0
; Checks
pkg_linter=1
setup_sub_dir=1
setup_root=1
setup_nourl=0
setup_private=1
setup_public=1
upgrade=1
# 5.4~ynh1
upgrade=1 from_commit=00a1a6e7dd5c814f5084c11c2810f886a32bdf61
# 5.8~ynh1
upgrade=1 from_commit=773073679873fbed3562c2d315f58eb4c1c0d4fc
backup_restore=1
multi_instance=1
port_already_use=0
change_url=1
;; Test avec multisite
; Manifest
domain="domain.tld"
path="/path"
is_public=1
language="fr_FR"
admin="john"
multisite=1
; Checks
setup_sub_dir=1
setup_root=0
setup_private=0
setup_public=1
upgrade=1
backup_restore=1
multi_instance=0
;;; Options
Email=
Notification=change
;;; Upgrade options
; commit=00a1a6e7dd5c814f5084c11c2810f886a32bdf61
name=Upgrade 5.4
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr_FR&multisite=0&is_public=1&

View file

@ -5,7 +5,7 @@ name = "WordPress"
description.en = "Create a beautiful blog or website easily"
description.fr = "Logiciel de création de blog ou de site Web"
version = "6.2.2~ynh1"
version = "6.3.0~ynh1"
maintainers = ["kay0u"]
@ -16,7 +16,7 @@ admindoc = "https://codex.wordpress.org/"
code = "https://core.trac.wordpress.org/browser"
[integration]
yunohost = ">= 11.1.21"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
ldap = true
@ -55,8 +55,8 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
url = "https://downloads.wordpress.org/release/wordpress-6.2.2.zip"
sha256 = "08669faf3c0c2289c66b1971cb0a6162d8d3ddac885ccbf342e29a0bda36250b"
url = "https://downloads.wordpress.org/release/wordpress-6.3.zip"
sha256 = "b4f0b53c9652b2d24d8762bec96a0604538b44b15f05187367112c0c8ea3abcf"
[resources.system_user]

View file

@ -17,11 +17,6 @@ if [ "$path" == "/" ] && [ $multisite -eq 1 ]; then
ynh_die --message="Multisite option of WordPress doesn't work at the root of a domain."
fi
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================

View file

@ -17,29 +17,12 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=8
# Remove the dedicated Fail2Ban config
ynh_remove_fail2ban_config
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=1
# Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app"

View file

@ -38,13 +38,11 @@ chmod 400 "$install_dir/wp-config.php"
chown $app:$app "$install_dir/wp-config.php"
#=================================================
# RESTORE FAIL2BAN CONFIGURATION
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=6
ynh_script_progression --message="Restoring the MySQL database..." --weight=3
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
@ -57,27 +55,14 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=2
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the MySQL database..." --weight=3
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_script_progression --message="Restoring various files..." --weight=1
ynh_restore_file --origin_path="/etc/cron.d/$app"
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
#=================================================
# GENERIC FINALIZATION
#=================================================