Browse Source
Force major upgrade only if it's an old version package
pull/119/head
Kay0u
5 years ago
No known key found for this signature in database
GPG Key ID: AAFEEB16CFA2AE2D
2 changed files with
9 additions and
5 deletions
-
manifest.json
-
scripts/upgrade
|
|
@ -6,7 +6,7 @@ |
|
|
"en": "Create a beautiful blog or website easily", |
|
|
"en": "Create a beautiful blog or website easily", |
|
|
"fr": "Logiciel de création de blog ou de site Web" |
|
|
"fr": "Logiciel de création de blog ou de site Web" |
|
|
}, |
|
|
}, |
|
|
"version": "5.6~ynh1", |
|
|
|
|
|
|
|
|
"version": "5.6~ynh2", |
|
|
"url": "https://wordpress.org/", |
|
|
"url": "https://wordpress.org/", |
|
|
"license": "GPL-2.0", |
|
|
"license": "GPL-2.0", |
|
|
"maintainer": { |
|
|
"maintainer": { |
|
|
|
|
|
@ -247,10 +247,14 @@ $wpcli_alias plugin activate simple-ldap-login $plugin_network |
|
|
update_plugin companion-auto-update |
|
|
update_plugin companion-auto-update |
|
|
$wpcli_alias plugin activate companion-auto-update $plugin_network |
|
|
$wpcli_alias plugin activate companion-auto-update $plugin_network |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Enable the auto update of major versions |
|
|
|
|
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) |
|
|
|
|
|
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< "UPDATE wp_auto_updates SET onoroff='on' WHERE wp_auto_updates.name='major';" |
|
|
|
|
|
|
|
|
if ynh_compare_current_package_version --comparison lt --version 5.6~ynh2 |
|
|
|
|
|
then |
|
|
|
|
|
# Get the database table prefix |
|
|
|
|
|
db_prefix=$(grep '^$table_prefix' "$final_path/wp-config.php" | sed "s/.*'\(.*\)'.*/\1/" ) |
|
|
|
|
|
# Enable the auto update of major versions |
|
|
|
|
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) |
|
|
|
|
|
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< "UPDATE ${db_prefix}auto_updates SET onoroff='on' WHERE ${db_prefix}auto_updates.name='major';" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
update_plugin wp-fail2ban-redux |
|
|
update_plugin wp-fail2ban-redux |
|
|
$wpcli_alias plugin activate wp-fail2ban-redux $plugin_network |
|
|
$wpcli_alias plugin activate wp-fail2ban-redux $plugin_network |
|
|
|