From 2eba93a71e3c9064e7fee3abfbb271e0785865d8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 21 Oct 2020 10:27:39 +0200 Subject: [PATCH] Small fixes --- scripts/backup | 4 ++-- scripts/change_url | 6 +++--- scripts/install | 19 +++++++++---------- scripts/remove | 6 +++--- scripts/restore | 4 ++-- scripts/upgrade | 16 ++++++++-------- 6 files changed, 27 insertions(+), 28 deletions(-) diff --git a/scripts/backup b/scripts/backup index a5d29d0..affe443 100644 --- a/scripts/backup +++ b/scripts/backup @@ -36,7 +36,7 @@ ynh_print_info --message="Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_script_progression --message="Backing up the main app directory..." +ynh_script_progression --message="Backing up AgenDAV directory..." # Clean cache files before backup ynh_secure_remove --file=${final_path}/web/var/cache/profiler @@ -75,4 +75,4 @@ ynh_backup --src_path="/etc/logrotate.d/$app" # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for AgenDAV. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 14c221d..6ce6d82 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -50,7 +50,7 @@ fi #================================================= # 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 @@ -81,7 +81,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 @@ -89,4 +89,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression --message="Change of URL completed for AgenDAV" --last diff --git a/scripts/install b/scripts/install index dcbfb4b..e17932c 100644 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -# Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= @@ -53,7 +52,7 @@ then caldav_app=radicale caldav_baseurl=/ else - ynh_die --message="Please install Baikal or Radicale before AgenDAV." + ynh_die --message="Please install Baïkal or Radicale before AgenDAV." fi #================================================= @@ -86,9 +85,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 -# Copy and set nginx configuration +# Copy and set NGINX configuration ynh_add_nginx_config #================================================= @@ -102,9 +101,9 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================ -ynh_script_progression --message="Configuring php-fpm..." +ynh_script_progression --message="Configuring PHP-FPM.." -# Copy and set php-fpm configuration +# Copy and set PHP-FPM configuration ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) @@ -113,7 +112,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CREATE SETTINGS.PHP #================================================= -ynh_script_progression --message="Configuring agendav..." --weight=2 +ynh_script_progression --message="Configuring AgenDAV..." --weight=2 # Generate random encryption key encryptkey=$(ynh_string_random --length=24) @@ -151,7 +150,7 @@ ynh_store_file_checksum --file="$conf_path" #================================================= # RUN DATABASE MIGRATIONS (INCLUDES INITIALIZATION) #================================================= -ynh_script_progression --message="Initialising agendav..." --weight=3 +ynh_script_progression --message="Initialising AgenDAV..." --weight=3 ( cd $final_path @@ -188,7 +187,7 @@ chmod -R 750 ${final_path}/web/config/ #================================================= # 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 @@ -196,4 +195,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of AgenDAV completed" --last diff --git a/scripts/remove b/scripts/remove index 622d4f0..609867a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,7 +31,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=2 +ynh_script_progression --message="Removing AgenDAV main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -48,7 +48,7 @@ ynh_secure_remove --file="/var/log/$app" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= @@ -81,4 +81,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of AgenDAV completed" --last diff --git a/scripts/restore b/scripts/restore index 62406eb..7dde0df 100644 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring AgenDAV main directory..." ynh_restore_file --origin_path="$final_path" @@ -119,4 +119,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for AgenDAV" --last diff --git a/scripts/upgrade b/scripts/upgrade index 9adcbb7..697a723 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,13 +75,13 @@ then caldav_app=radicale caldav_baseurl=/ else - ynh_die --message="Please install Baikal or Radicale before AgenDAV." + ynh_die --message="Please install Baïkal or Radicale before AgenDAV." fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=9 +ynh_script_progression --message="Backing up AgenDAV before upgrading (may take a while)..." --weight=9 # Backup the current version of the app ynh_backup_before_upgrade @@ -116,9 +116,9 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 -# Copy and set nginx configuration +# Copy and set NGINX configuration ynh_add_nginx_config #================================================= @@ -134,7 +134,7 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= @@ -142,7 +142,7 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc #================================================= # CREATE SETTINGS.PHP #================================================= -ynh_script_progression --message="Upgrading agendav configuration..." --weight=2 +ynh_script_progression --message="Upgrading AgenDAV configuration..." --weight=2 # Generate random encryption key encryptkey=$(ynh_app_setting_get --app=$app --key=encryptkey) @@ -182,7 +182,7 @@ ynh_store_file_checksum --file="$conf_path" #================================================= # RUN DATABASE MIGRATIONS (INCLUDES INITIALIZATION) #================================================= -ynh_script_progression --message="Upgrading agendav..." +ynh_script_progression --message="Upgrading AgenDAV..." ( cd $final_path @@ -227,4 +227,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of AgenDAV completed" --last