mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Merge pull request #63 from YunoHost-Apps/upgrade52
Upgrade to Wordpress 5.2
This commit is contained in:
commit
9a03652f1d
9 changed files with 43 additions and 4 deletions
|
@ -10,7 +10,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.0.3
|
||||
**Shipped version:** 5.2
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://wordpress.org/wordpress-5.0.3.tar.gz
|
||||
SOURCE_SUM=83bec78836aabac08f769d50f1bffe5d
|
||||
SOURCE_URL=https://wordpress.org/wordpress-5.2.tar.gz
|
||||
SOURCE_SUM=a45a23290f24ac7779e38a2bc8655344
|
||||
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.0.3~ynh1",
|
||||
"version": "5.2~ynh1",
|
||||
"url": "https://wordpress.org/",
|
||||
"license": "GPL-2.0",
|
||||
"maintainer": {
|
||||
|
|
|
@ -68,6 +68,12 @@ ynh_script_progression --message="Backup fail2ban configuration"
|
|||
ynh_backup "/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_backup "/etc/fail2ban/filter.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP CRON
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -124,6 +124,13 @@ fi
|
|||
ynh_mysql_execute_as_root "UPDATE wp_options SET option_value='$new_domain$new_path' WHERE option_name='siteurl'" $app
|
||||
ynh_mysql_execute_as_root "UPDATE wp_options SET option_value='$new_domain$new_path' WHERE option_name='home'" $app
|
||||
|
||||
#=================================================
|
||||
# UPDATE THE CRON
|
||||
#=================================================
|
||||
|
||||
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress cron.
|
||||
0 3 * * * root wget -q -O - https://$new_domain$new_path/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -228,6 +228,13 @@ $wpcli_alias plugin activate wp-fail2ban $plugin_network
|
|||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/wp-config.php"
|
||||
|
||||
#=================================================
|
||||
# CREATE A CRON TASK FOR AUTOMATIC UPDATE
|
||||
#=================================================
|
||||
|
||||
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress cron.
|
||||
0 3 * * * root wget -q -O - https://$domain$path_url/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -69,6 +69,12 @@ ynh_script_progression --message="Remove fail2ban configuration" --weight=8
|
|||
# Remove the dedicated fail2ban config
|
||||
ynh_remove_fail2ban_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE THE CRON
|
||||
#=================================================
|
||||
|
||||
ynh_secure_remove /etc/cron.d/$app
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -103,6 +103,12 @@ ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
|||
ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
||||
ynh_systemd_action --action=restart --service_name=fail2ban
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE CRON
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -200,6 +200,13 @@ $wpcli_alias plugin is-installed http-authentication && $wpcli_alias plugin deac
|
|||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum "$final_path/wp-config.php"
|
||||
|
||||
#=================================================
|
||||
# CREATE A CRON TASK FOR AUTOMATIC UPDATE
|
||||
#=================================================
|
||||
|
||||
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress cron.
|
||||
0 3 * * * root wget -q -O - https://$domain$path_url/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue