diff --git a/config_panel.toml b/config_panel.toml index c96a294..10e11b1 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -9,7 +9,7 @@ name = "Wordpress configuration" name = "Public access" [main.is_public.is_public] - ask = "Is it a public WordPress site ?" + ask = "Is it a public WordPress site?" type = "boolean" default = true @@ -18,13 +18,13 @@ name = "Wordpress configuration" name = "Overwriting config files" [main.overwrite_files.overwrite_nginx] - ask = "Overwrite the nginx config file ?" + ask = "Overwrite the NGINX config file?" type = "boolean" default = true help = "If the file is overwritten, a backup will be created." [main.overwrite_files.overwrite_phpfpm] - ask = "Overwrite the php-fpm config file ?" + ask = "Overwrite the PHP-FPM config file?" type = "boolean" default = true help = "If the file is overwritten, a backup will be created." @@ -34,7 +34,7 @@ name = "Wordpress configuration" name = "Global configuration" [main.global_config.email_type] - ask = "Send HTML email to admin ?" + ask = "Send HTML email to admin?" type = "boolean" default = true help = "Allow app scripts to send HTML mails instead of plain text." @@ -44,25 +44,25 @@ name = "Wordpress configuration" name = "PHP-FPM configuration" [main.php_fpm_config.footprint] - ask = "Memory footprint of the service ?" + ask = "Memory footprint of the service?" choices = ["low", "medium", "high", "specific"] default = "low" help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.
Use specific to set a value with the following option." [main.php_fpm_config.free_footprint] - ask = "Memory footprint of the service ?" + ask = "Memory footprint of the service?" type = "number" default = "0" help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." [main.php_fpm_config.usage] - ask = "Expected usage of the service ?" + ask = "Expected usage of the service?" choices = ["low", "medium", "high"] default = "low" - help = "low: Personal usage, behind the sso. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." + help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." [main.php_fpm_config.force_max_children] - ask = "Force the value of pm.max_children ?" + ask = "Force the value of pm.max_children?" type = "number" default = "0" - help = "Do not change this value unless you're sure about what you're doing !
pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint
You can force that value, and ignore the formula by changing the value here.
To reset to the default value, set to 0." + help = "Do not change this value unless you are sure about what you are doing!
pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint
You can force that value, and ignore the formula by changing the value here.
To reset to the default value, set to 0." diff --git a/scripts/_common.sh b/scripts/_common.sh index 9d5c330..3c25980 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,8 @@ YNH_PHP_VERSION="7.3" +extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-soap php${YNH_PHP_VERSION}-ssh2 php${YNH_PHP_VERSION}-tokenizer" + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/change_url b/scripts/change_url index 1ddec58..1990e6e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -31,7 +31,7 @@ multisite=$(ynh_app_setting_get --app=$app --key=multisite) if [ $multisite -eq 1 ] then - echo "A multisite installation of Wordpress can't be moved easily. Please have a look at the Wordpress codex to learn more about that." >&2 + echo "A multisite installation of WordPress can't be moved easily. Please have a look at the WordPress codex to learn more about that." >&2 ynh_die --message="https://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite" fi diff --git a/scripts/install b/scripts/install index 5ba7b22..27b7ba6 100644 --- a/scripts/install +++ b/scripts/install @@ -142,7 +142,7 @@ chown -R $app: $final_path # Set the app as temporarily public for cURL call ynh_permission_update --permission "main" --add "visitors" -# Reload Nginx +# Reload NGINX ynh_systemd_action --service_name=nginx --action=reload # Wordpress installation @@ -151,9 +151,9 @@ ynh_local_curl "/wp-admin/install.php?step=2" "&weblog_title=YunoBlog" "user_nam ynh_print_info --message="Please wait during Wordpress installation..." for i in `seq 1 300` do - # The loop waits for wordpress to be installed, or 5 minutes. + # The loop waits for WordPress to be installed, or 5 minutes. if ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< "show tables" | grep --quiet "wp_options"; then - # If the table wp_options is found, wordpress has finished its installation. + # If the table wp_options is found, WordPress has finished its installation. break fi sleep 1 @@ -162,7 +162,7 @@ done #================================================= # INSTALL WORDPRESS PLUGINS #================================================= -ynh_script_progression --message="Installing wordpress plugins..." --weight=20 +ynh_script_progression --message="Installing WordPress plugins..." --weight=20 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" @@ -226,7 +226,7 @@ ynh_store_file_checksum --file="$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. +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 #================================================= @@ -246,7 +246,7 @@ chown root: $final_path/wp-config.php #================================================= ynh_script_progression --message="Configuring Fail2Ban..." --weight=7 -# Create a dedicated fail2ban config +# Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/var/log/auth.log" --failregex="Authentication (attempt for unknown user|failure for) .* from " --max_retry=5 #================================================= diff --git a/scripts/remove b/scripts/remove index 71ec8a0..d48c28a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -59,7 +59,7 @@ ynh_remove_fpm_config #================================================= ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=8 -# Remove the dedicated fail2ban config +# Remove the dedicated Fail2Ban config ynh_remove_fail2ban_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f40c431..e201461 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -172,7 +172,7 @@ ynh_maintenance_mode_ON # NGINX CONFIGURATION #================================================= -# Overwrite the nginx configuration only if it's allowed +# Overwrite the NGINX configuration only if it's allowed if [ $overwrite_nginx -eq 1 ] then ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 @@ -191,11 +191,11 @@ ynh_system_user_create --username=$app # PHP-FPM CONFIGURATION #================================================= -# Overwrite the php-fpm configuration only if it's allowed +# Overwrite the PHP-FPM configuration only if it's allowed if [ $overwrite_phpfpm -eq 1 ] then ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 - # Create a dedicated php-fpm config + # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint fi @@ -283,7 +283,7 @@ chown root: $final_path/wp-config.php #================================================= ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=9 -# Create a dedicated fail2ban config +# Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/var/log/auth.log" --failregex="Authentication (attempt for unknown user|failure for) .* from " --max_retry=5 #=================================================