mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
commit
9a8b394762
8 changed files with 16 additions and 45 deletions
|
@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
|||
WordPress is open source software you can use to create a beautiful website, blog, or app.
|
||||
With this package, you can even activate the [multisite](https://codex.wordpress.org/Glossary#Multisite) option.
|
||||
|
||||
**Shipped version:** 5.5.1
|
||||
**Shipped version:** 5.5.3
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -43,7 +43,6 @@ Supported, with LDAP and SSO.
|
|||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/wordpress/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/wordpress/)
|
||||
* Buster x86-64b - [](https://ci-buster.nohost.me/ci/apps/wordpress/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -69,8 +68,7 @@ Furthermore, you might take a look at the [Hardening Wordpress Guide](https://wo
|
|||
|
||||
---
|
||||
|
||||
Developers infos
|
||||
----------------
|
||||
## Developers infos
|
||||
|
||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/wordpress_ynh/tree/testing).
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
|
|||
WordPress est un logiciel libre que vous pouvez utiliser pour créer un site ou un blog.
|
||||
Avec ce package, vous pouvez même activer l'option [multisite](https://codex.wordpress.org/Glossary#Multisite).
|
||||
|
||||
**Version incluse :** 5.5.1
|
||||
**Version incluse :** 5.5.3
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
|
@ -43,7 +43,6 @@ Supporté, avec LDAP et SSO.
|
|||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/wordpress/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/wordpress/)
|
||||
* Buster x86-64b - [](https://ci-buster.nohost.me/ci/apps/wordpress/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -69,8 +68,7 @@ Par ailleurs, vous pourriez avoir besoin de regarder [ce guide](https://wordpres
|
|||
|
||||
---
|
||||
|
||||
Informations pour les développeurs
|
||||
----------------
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/wordpress_ynh/tree/testing).
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://wordpress.org/wordpress-5.5.1.tar.gz
|
||||
SOURCE_SUM=72c6f56b4818ffd0e6e6a4ed8f3e8d4e
|
||||
SOURCE_URL=https://wordpress.org/wordpress-5.5.3.tar.gz
|
||||
SOURCE_SUM=c9220f0d5c9c593412da6c0193e43d94
|
||||
SOURCE_SUM_PRG=md5sum
|
||||
ARCH_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Create a beautiful blog or website easily",
|
||||
"fr": "Logiciel de création de blog ou de site Web"
|
||||
},
|
||||
"version": "5.5.1~ynh1",
|
||||
"version": "5.5.3~ynh1",
|
||||
"url": "https://wordpress.org/",
|
||||
"license": "GPL-2.0",
|
||||
"maintainer": {
|
||||
|
|
|
@ -1,27 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# BACKUP
|
||||
#=================================================
|
||||
|
||||
HUMAN_SIZE () { # Transforme une taille en Ko en une taille lisible pour un humain
|
||||
human=$(numfmt --to=iec --from-unit=1K $1)
|
||||
echo $human
|
||||
}
|
||||
|
||||
CHECK_SIZE () { # Vérifie avant chaque backup que l'espace est suffisant
|
||||
file_to_analyse=$1
|
||||
backup_size=$(du --summarize "$file_to_analyse" | cut -f1)
|
||||
free_space=$(df --output=avail "/home/yunohost.backup" | sed 1d)
|
||||
|
||||
if [ $free_space -le $backup_size ]
|
||||
then
|
||||
ynh_print_err "Espace insuffisant pour sauvegarder $file_to_analyse."
|
||||
ynh_print_err "Espace disponible: $(HUMAN_SIZE $free_space)"
|
||||
ynh_die "Espace nécessaire: $(HUMAN_SIZE $backup_size)"
|
||||
fi
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -19,7 +19,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=2
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -29,41 +29,38 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the main app directory..." --weight=2
|
||||
|
||||
CHECK_SIZE "$final_path"
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up nginx web server configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up php-fpm configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the MySQL database..." --weight=2
|
||||
ynh_print_info --message="Backing up the MySQL database..."
|
||||
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
CHECK_SIZE "db.sql"
|
||||
|
||||
#=================================================
|
||||
# BACKUP FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up fail2ban configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||
|
@ -78,4 +75,4 @@ ynh_backup "/etc/cron.d/$app"
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -166,7 +166,7 @@ done
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing wordpress plugins..." --weight=20
|
||||
|
||||
wget --no-verbose https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar --output-document=$final_path/wp-cli.phar
|
||||
ynh_exec_warn_less wget --no-verbose https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar --output-document=$final_path/wp-cli.phar
|
||||
wpcli_alias="php$phpversion $final_path/wp-cli.phar --allow-root --path=$final_path"
|
||||
|
||||
$wpcli_alias plugin install simple-ldap-login
|
||||
|
|
|
@ -137,7 +137,7 @@ if [ -z "$phpversion" ]; then
|
|||
fi
|
||||
|
||||
# Replace wp-fail2ban by wp-fail2ban-redux
|
||||
wget -nv https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O $final_path/wp-cli.phar
|
||||
ynh_exec_warn_less wget --no-verbose https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar --output-document=$final_path/wp-cli.phar
|
||||
wpcli_alias="php$phpversion $final_path/wp-cli.phar --allow-root --path=$final_path"
|
||||
if [ $multisite -eq 1 ]; then
|
||||
plugin_network="--network"
|
||||
|
|
Loading…
Add table
Reference in a new issue