1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wordpress_ynh.git synced 2024-09-03 20:36:10 +02:00

Small typos

This commit is contained in:
ericgaspar 2020-12-05 10:36:07 +01:00
parent d82aef418e
commit 153cc2e656
No known key found for this signature in database
GPG key ID: 574F281483054D44
8 changed files with 57 additions and 58 deletions

View file

@ -48,8 +48,6 @@
upgrade=1
backup_restore=1
multi_instance=1
;;; Levels
Level 5=auto
;;; Options
Email=
Notification=change

View file

@ -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.<br>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.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>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.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>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 !<br>pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint<br>You can force that value, and ignore the formula by changing the value here.<br>To reset to the default value, set to 0."
help = "Do not change this value unless you are sure about what you are doing!<br>pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint<br>You can force that value, and ignore the formula by changing the value here.<br>To reset to the default value, set to 0."

View file

@ -1,5 +1,13 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
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
#=================================================

View file

@ -31,14 +31,14 @@ 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
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --weight=5
ynh_script_progression --message="Backing up the app before changing itsURL (may take a while)..." --weight=5
# Backup the current version of the app
ynh_backup_before_upgrade
@ -82,25 +82,25 @@ fi
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating nginx web server configuration..." --weight=3
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
# Change the path in the nginx config file
# Change the path in the NGINX config file
if [ $change_path -eq 1 ]
then
# Make a backup of the original nginx config file if modified
# Make a backup of the original NGINX config file if modified
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
# Set global variables for nginx helper
# Set global variables for NGINX helper
domain="$old_domain"
path_url="$new_path"
# Create a dedicated nginx config
# Create a dedicated NGINX config
ynh_add_nginx_config
fi
# Change the domain for nginx
# Change the domain for NGINX
if [ $change_domain -eq 1 ]
then
# Delete file checksum for the old conf file location
@ -135,7 +135,7 @@ echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..."
ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -83,9 +83,9 @@ ynh_setup_source --dest_dir="$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring nginx web server..." --weight=3
ynh_script_progression --message="Configuring NGINX web server..." --weight=3
# Create a dedicated nginx config
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -99,7 +99,7 @@ ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring php-fpm..." --weight=2
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# If the app is private, set the usage to low, otherwise to high.
if [ $is_public -eq 0 ]
@ -117,7 +117,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CONFIGURE WP-CONFIG
#=================================================
ynh_script_progression --message="Configuring wordpress..."
ynh_script_progression --message="Configuring WordPress..."
cp ../conf/wp-config.php $final_path/wp-config.php
# Change variables in Wordpress configuration
@ -134,9 +134,9 @@ done
#=================================================
# SETTING UP WITH CURL
#=================================================
ynh_script_progression --message="Installing wordpress with Curl..." --weight=10
ynh_script_progression --message="Installing wordpress with cURL..." --weight=10
# Set right permissions for curl install
# Set right permissions for cURL install
chown -R $app: $final_path
# Set the app as temporarily public for curl call
@ -144,7 +144,7 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
# Regen SSOwat configuration
yunohost app ssowatconf
# Reload Nginx
# Reload NGINX
ynh_systemd_action --service_name=nginx --action=reload
# Wordpress installation
@ -153,9 +153,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
@ -164,7 +164,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"
@ -228,7 +228,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,9 +246,9 @@ chown root: $final_path/wp-config.php
#=================================================
# SETUP FAIL2BAN
#=================================================
ynh_script_progression --message="Configuring fail2ban..." --weight=7
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 <HOST>" --max_retry=5
#=================================================
@ -265,7 +265,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..." --weight=3
ynh_script_progression --message="Reloading NGINX web server..." --weight=3
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -41,25 +41,25 @@ ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing nginx web server configuration..."
ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated nginx config
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing php-fpm configuration..." --weight=2
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
# Remove the dedicated php-fpm config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Removing fail2ban configuration..." --weight=8
ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=8
# Remove the dedicated fail2ban config
# Remove the dedicated Fail2Ban config
ynh_remove_fail2ban_config
#=================================================

View file

@ -99,7 +99,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the fail2ban configuration..." --weight=6
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=6
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
@ -116,7 +116,7 @@ ynh_restore_file "/etc/cron.d/$app"
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=2
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=2
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -161,13 +161,6 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK THE PATH
#=================================================
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path --path_url=$path_url)
#=================================================
# ACTIVATE MAINTENANCE MODE
#=================================================
@ -179,10 +172,10 @@ 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
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
ynh_add_nginx_config
fi
@ -198,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
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
fi
@ -288,9 +281,9 @@ chown root: $final_path/wp-config.php
#=================================================
# UPGRADE FAIL2BAN
#=================================================
ynh_script_progression --message="Reconfiguring fail2ban..." --weight=9
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 <HOST>" --max_retry=5
#=================================================
@ -311,7 +304,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..."
ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload