From 96cddf0e5db86f9b12ef187b521ed8c88e60e324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 31 May 2023 18:46:06 +0200 Subject: [PATCH] Fix linter --- scripts/backup | 13 +++++++------ scripts/change_url | 4 ++-- scripts/install | 6 +++--- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/backup b/scripts/backup index 308ba1c..a440220 100644 --- a/scripts/backup +++ b/scripts/backup @@ -42,12 +42,6 @@ ynh_backup --src_path="$public_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PostgreSQL DATABASE -#================================================= - -ynh_psql_dump_db --database="$db_name" > db.sql - #================================================= # SPECIFIC BACKUP #================================================= @@ -62,6 +56,13 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" +#================================================= +# BACKUP THE PostgreSQL DATABASE +#================================================= +ynh_print_info --message="Backing up the PostgreSQL database..." + +ynh_psql_dump_db --database="$db_name" > db.sql + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/change_url b/scripts/change_url index cb77f04..c4fa51a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -95,7 +95,7 @@ ynh_systemd_action --service_name="$app" --action="stop" #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -145,7 +145,7 @@ ynh_systemd_action --service_name="$app" --action="start" #================================================= # 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 diff --git a/scripts/install b/scripts/install index a9b9106..5bc75f7 100644 --- a/scripts/install +++ b/scripts/install @@ -93,7 +93,7 @@ ynh_psql_setup_db --db_user="$db_user" --db_name="$db_name" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated nginx config # https://yunohost.org/en/contribute/packaging_apps/helpers @@ -103,7 +103,7 @@ ynh_add_nginx_config "public_path" "port" #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user '$app'..." +ynh_script_progression --message="Configuring system user $app..." # A home directory for venv and settings etc. ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell @@ -237,7 +237,7 @@ ynh_systemd_action --service_name="$app" --action="start" #================================================= # 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" diff --git a/scripts/remove b/scripts/remove index dc573b8..e9c4bbc 100644 --- a/scripts/remove +++ b/scripts/remove @@ -74,7 +74,7 @@ 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 ynh_remove_nginx_config diff --git a/scripts/restore b/scripts/restore index 2056048..eaf5475 100644 --- a/scripts/restore +++ b/scripts/restore @@ -165,7 +165,7 @@ ynh_systemd_action --service_name="$app" --action="start" #================================================= # 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" diff --git a/scripts/upgrade b/scripts/upgrade index 9df5111..56871cc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -216,7 +216,7 @@ ynh_systemd_action --service_name="$app" --action="start" #================================================= # 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