From 7a0b62eddb134ca905619a1ac7ec83a8db3af618 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Fri, 17 Apr 2020 12:37:54 +0200 Subject: [PATCH] Misc updates --- README.md | 2 +- check_process | 5 +---- scripts/change_url | 7 ------- scripts/install | 10 ++++++++-- scripts/restore | 8 +++++++- scripts/upgrade | 25 ++++++++++++++++++------- 6 files changed, 35 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 414c54f..5e0b80e 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Supported, with LDAP and SSO. * x86-64b - [![](https://ci-apps.yunohost.org/ci/logs/wordpress%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/wordpress/) * ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/wordpress%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/wordpress/) -* Jessie x86-64b - [![](https://ci-stretch.nohost.me/ci/logs/wordpress%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/wordpress/) +* Buster x86-64b - [![](https://ci-buster.nohost.me/ci/logs/wordpress%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/wordpress/) ## Limitations diff --git a/check_process b/check_process index 533da94..337ce41 100644 --- a/check_process +++ b/check_process @@ -43,19 +43,16 @@ ; Checks setup_sub_dir=1 setup_root=0 - setup_nourl=0 setup_private=1 setup_public=1 upgrade=1 backup_restore=1 multi_instance=1 - port_already_use=0 - change_url=0 ;;; Levels Level 5=auto ;;; Options Email= -Notification=down +Notification=change ;;; Upgrade options ; commit=cbb74263e33deb0ec36f99886a2f773e36d40fd9 name=Upgrade 4.8 diff --git a/scripts/change_url b/scripts/change_url index 3ba81c0..d35f7a7 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -77,13 +77,6 @@ then change_path=1 fi -#================================================= -# MANAGE FAILURE OF THE SCRIPT -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD MODIFICATIONS #================================================= diff --git a/scripts/install b/scripts/install index e66ac45..86945d3 100644 --- a/scripts/install +++ b/scripts/install @@ -117,7 +117,7 @@ else usage=high fi # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=$usage --footprint=$usage +ynh_add_fpm_config --usage=$usage --footprint=medium #================================================= # SPECIFIC SETUP @@ -286,7 +286,13 @@ ynh_secure_remove $final_path/wp-cli.phar # SEND A README FOR THE ADMIN #================================================= -echo "If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/wordpress_ynh" > mail_to_send +# Get main domain and buid the url of the admin panel of the app. +admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" + +echo "You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. +You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__. + +If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/wordpress_ynh__URL_TAG3__." > mail_to_send ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="$admin_wordpress" --type=install diff --git a/scripts/restore b/scripts/restore index dceb28e..f02810a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -131,7 +131,13 @@ ynh_maintenance_mode_OFF # SEND A README FOR THE ADMIN #================================================= -echo "If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/wordpress_ynh" > mail_to_send +# Get main domain and buid the url of the admin panel of the app. +admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" + +echo "You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. +You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__. + +If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/wordpress_ynh__URL_TAG3__." > mail_to_send ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="$admin_wordpress" --type=restore diff --git a/scripts/upgrade b/scripts/upgrade index 55f4667..da9bab3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ fi # If fpm_footprint doesn't exist, create it if [ -z "$fpm_footprint" ]; then - fpm_footprint=$usage + fpm_footprint=medium ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint fi @@ -223,14 +223,17 @@ ynh_script_progression --message="Configuring multisite..." --weight=2 if [ $multisite -eq 1 ] then ynh_replace_string --match_string="#--MULTISITE--" --replace_string="" --target_file=/etc/nginx/conf.d/$domain.d/$app.conf + + ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf" + + ynh_systemd_action --service_name=nginx --action=reload + plugin_network="--network" else multisite=0 plugin_network="" - if [ $is_public -eq 0 ] + if [ $is_public -eq 1 ] then - ynh_replace_string --match_string="#--PRIVATE--" --replace_string="" --target_file=/etc/nginx/conf.d/$domain.d/$app.conf - else ynh_replace_string --match_string="//--PUBLIC--define" --replace_string="define" --target_file=$final_path/wp-config.php fi fi @@ -332,10 +335,18 @@ ynh_maintenance_mode_OFF # Get main domain and buid the url of the admin panel of the app. admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" -# Build the changelog -ynh_app_changelog || true +# If a html email is required. Apply html to the changelog. +if [ "$admin_mail_html" -eq 1 ]; then + format=html +else + format=plain +fi +ynh_app_changelog --format=$format -echo "If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/wordpress_ynh__URL_TAG3__. +echo "You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. +You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__. + +If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/wordpress_ynh__URL_TAG3__. ---