1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Minor typos

This commit is contained in:
ericgaspar 2020-09-13 12:41:43 +02:00
parent a31385b6b6
commit 8f7fb69e83
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 36 additions and 36 deletions

View file

@ -50,23 +50,23 @@ fi
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf 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 ] if [ $change_path -eq 1 ]
then 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" 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" domain="$old_domain"
path_url="$new_path" path_url="$new_path"
# Create a dedicated nginx config # Create a dedicated NGINX config
ynh_add_nginx_config YNH_PHP_VERSION ynh_add_nginx_config YNH_PHP_VERSION
fi fi
# Change the domain for nginx # Change the domain for NGINX
if [ $change_domain -eq 1 ] if [ $change_domain -eq 1 ]
then then
# Delete file checksum for the old conf file location # Delete file checksum for the old conf file location
@ -114,7 +114,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # 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 ynh_systemd_action --service_name=nginx --action=reload

View file

@ -87,7 +87,7 @@ ynh_setup_source --dest_dir="$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring nginx web server..." --weight=2 ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Check if .well-known is available for this domain # Check if .well-known is available for this domain
if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav"
@ -98,7 +98,7 @@ then
sed --in-place --regexp-extended '/^location = \/\.well\-known\/(caldav|carddav) \{/,/\}/d' "../conf/nginx.conf" sed --in-place --regexp-extended '/^location = \/\.well\-known\/(caldav|carddav) \{/,/\}/d' "../conf/nginx.conf"
fi fi
# Create a dedicated nginx config # Create a dedicated NGINX config
ynh_add_nginx_config YNH_PHP_VERSION ynh_add_nginx_config YNH_PHP_VERSION
#================================================= #=================================================
@ -112,7 +112,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring php-fpm..." --weight=50 ynh_script_progression --message="Configuring PHP-FPM..." --weight=50
# Create a dedicated php-fpm config # Create a dedicated php-fpm config
ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
@ -131,7 +131,7 @@ mkdir -p "$datadir"
#================================================= #=================================================
# INSTALL NEXTCLOUD # INSTALL NEXTCLOUD
#================================================= #=================================================
ynh_script_progression --message="Installing nextcloud..." --weight=30 ynh_script_progression --message="Installing Nextcloud..." --weight=30
# Define a function to execute commands with `occ` # Define a function to execute commands with `occ`
exec_occ() { exec_occ() {
@ -153,7 +153,7 @@ exec_occ maintenance:install \
#================================================= #=================================================
# CONFIGURE NEXTCLOUD # CONFIGURE NEXTCLOUD
#================================================= #=================================================
ynh_script_progression --message="Configuring nextcloud..." --weight=8 ynh_script_progression --message="Configuring Nextcloud..." --weight=8
# Ensure that UpdateNotification app is disabled # Ensure that UpdateNotification app is disabled
exec_occ app:disable updatenotification exec_occ app:disable updatenotification
@ -162,7 +162,7 @@ exec_occ app:disable updatenotification
exec_occ app:enable user_ldap exec_occ app:enable user_ldap
exec_occ ldap:create-empty-config exec_occ ldap:create-empty-config
# Load the installation config file in nextcloud # Load the installation config file in Nextcloud
nc_conf="$final_path/config_install.json" nc_conf="$final_path/config_install.json"
cp ../conf/config_install.json "$nc_conf" cp ../conf/config_install.json "$nc_conf"
@ -327,9 +327,9 @@ ynh_use_logrotate --logfile="$datadir/nextcloud.log"
#================================================= #=================================================
# SETUP FAIL2BAN # SETUP FAIL2BAN
#================================================= #=================================================
ynh_script_progression --message="Configuring fail2ban..." --weight=8 ynh_script_progression --message="Configuring Fail2ban..." --weight=8
# Create a dedicated fail2ban config # Create a dedicated Fail2ban config
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5 ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
#================================================= #=================================================
@ -344,7 +344,7 @@ ynh_app_setting_set --app=$app --key=skipped_regex \
#================================================= #=================================================
# RELOAD NGINX # 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 ynh_systemd_action --service_name=nginx --action=reload

View file

@ -49,17 +49,17 @@ ynh_secure_remove --file="$final_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # 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 ynh_remove_nginx_config
#================================================= #=================================================
# REMOVE PHP-FPM CONFIGURATION # 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 ynh_remove_fpm_config
#================================================= #=================================================
@ -73,9 +73,9 @@ ynh_remove_logrotate
#================================================= #=================================================
# REMOVE FAIL2BAN CONFIGURATION # 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 ynh_remove_fail2ban_config
#================================================= #=================================================

View file

@ -95,7 +95,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Reconfiguring php-fpm..." --weight=50 ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50
# Restore the file first, so it can have a backup if different # Restore the file first, so it can have a backup if different
ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
@ -156,7 +156,7 @@ ynh_multimedia_addaccess $app
#================================================= #=================================================
# RESTORE THE FAIL2BAN CONFIGURATION # RESTORE THE FAIL2BAN CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the fail2ban configuration..." --weight=7 ynh_script_progression --message="Restoring the Fail2ban configuration..." --weight=7
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
@ -175,7 +175,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban
#================================================= #=================================================
# RELOAD NGINX # 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 ynh_systemd_action --service_name=nginx --action=reload

View file

@ -143,7 +143,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -177,7 +177,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2 ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Recreate a dedicated php-fpm config # Recreate a dedicated php-fpm config
ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies" ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
@ -223,7 +223,7 @@ datadir="/home/yunohost.app/$app/data"
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading nextcloud..." --weight=3 ynh_script_progression --message="Upgrading Nextcloud..." --weight=3
# Load the last available version # Load the last available version
source upgrade.d/upgrade.last.sh source upgrade.d/upgrade.last.sh
@ -234,7 +234,7 @@ then
# Set write access for the following commands # Set write access for the following commands
chown -R $app: "$final_path" "$datadir" chown -R $app: "$final_path" "$datadir"
# Print the current version number of nextcloud # Print the current version number of Nextcloud
exec_occ -V exec_occ -V
# While the current version is not the last version, do an upgrade # While the current version is not the last version, do an upgrade
@ -257,7 +257,7 @@ then
ynh_print_info --message="Upgrade to nextcloud $next_version" ynh_print_info --message="Upgrade to nextcloud $next_version"
# Create an app.src for this version of nextcloud # Create an app.src for this version of Nextcloud
cp ../conf/app.src.default ../conf/app.src cp ../conf/app.src.default ../conf/app.src
ynh_replace_string --match_string="__VERSION__" --replace_string="$next_version" --target_file="../conf/app.src" ynh_replace_string --match_string="__VERSION__" --replace_string="$next_version" --target_file="../conf/app.src"
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$nextcloud_source_sha256" --target_file="../conf/app.src" ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$nextcloud_source_sha256" --target_file="../conf/app.src"
@ -274,7 +274,7 @@ then
# Backup the config file in the temp dir # Backup the config file in the temp dir
cp -a "$final_path/config/config.php" "$tmpdir/config/config.php" cp -a "$final_path/config/config.php" "$tmpdir/config/config.php"
# Backup 3rd party applications from the current nextcloud # Backup 3rd party applications from the current Nextcloud
# But do not overwrite if there is any upgrade # But do not overwrite if there is any upgrade
# (apps directory already exists in Nextcloud archive) # (apps directory already exists in Nextcloud archive)
( (
@ -319,7 +319,7 @@ then
#================================================= #=================================================
# CONFIGURE NEXTCLOUD # CONFIGURE NEXTCLOUD
#================================================= #=================================================
ynh_script_progression --message="Reconfiguring nextcloud..." --weight=9 ynh_script_progression --message="Reconfiguring Nextcloud..." --weight=9
# Verify the checksum and backup the file if it's different # Verify the checksum and backup the file if it's different
ynh_backup_if_checksum_is_different --file="$final_path/config/config.php" ynh_backup_if_checksum_is_different --file="$final_path/config/config.php"
@ -445,9 +445,9 @@ ynh_use_logrotate --non-append
#================================================= #=================================================
# SETUP FAIL2BAN # SETUP FAIL2BAN
#================================================= #=================================================
ynh_script_progression --message="Reconfiguring fail2ban..." --weight=7 ynh_script_progression --message="Reconfiguring Fail2ban..." --weight=7
# Create a dedicated fail2ban config # Create a dedicated Fail2ban config
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5 ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
#================================================= #=================================================
@ -464,7 +464,7 @@ ynh_app_setting_set --app=$app --key=skipped_regex \
#================================================= #=================================================
# RELOAD NGINX # 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 ynh_systemd_action --service_name=nginx --action=reload
@ -474,7 +474,7 @@ ynh_systemd_action --service_name=nginx --action=reload
if [ $migration_process -eq 1 ] if [ $migration_process -eq 1 ]
then then
ynh_print_info --message="ownCloud has been successfully migrated to Nextcloud! \ ynh_print_info --message="OwnCloud has been successfully migrated to Nextcloud! \
A last scheduled operation will run in a couple of minutes to finish the \ A last scheduled operation will run in a couple of minutes to finish the \
migration in YunoHost side. Do not proceed any application operation while \ migration in YunoHost side. Do not proceed any application operation while \
you don't see Nextcloud as installed." you don't see Nextcloud as installed."