From e347bf4c2753a7fd1ba2e42dea212bc65da9bfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 1 Sep 2024 21:26:22 +0200 Subject: [PATCH] cleaning --- scripts/install | 5 ----- scripts/remove | 1 - scripts/restore | 2 -- scripts/upgrade | 6 ------ 4 files changed, 14 deletions(-) diff --git a/scripts/install b/scripts/install index 4d72c7f..2b92716 100644 --- a/scripts/install +++ b/scripts/install @@ -24,12 +24,9 @@ mkdir -p $install_dir/config #================================================= ynh_script_progression "Configuring NGINX web server..." -# Create a dedicated NGINX config ynh_config_add --template="funkwhale_proxy.conf" --destination="/etc/nginx/conf.d/$domain.d/funkwhale_proxy.conf" ynh_config_add_nginx -#================================================= -# SPECIFIC SETUP #================================================= # CREATE DATA DIRECTORY #================================================= @@ -114,7 +111,6 @@ popd #================================================= ynh_script_progression "Configuring logrotate to manage application logfiles" -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate touch /var/log/$app/${app}-server.log @@ -135,7 +131,6 @@ yunohost service add "${app}-worker" --description="${app} celery worker" --log= #================================================= ynh_script_progression "Starting $app's systemd service..." -# Start a systemd service ynh_systemctl --service="${app}-beat" --action="start" --log_path="systemd" ynh_systemctl --service="${app}-server" --action="start" --log_path="systemd" --wait_until="Application startup complete" ynh_systemctl --service="${app}-worker" --action="start" --log_path="systemd" --wait_until="ready" diff --git a/scripts/remove b/scripts/remove index 84c8b2a..a56aecb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,7 +9,6 @@ source /usr/share/yunohost/helpers # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_hide_warnings yunohost service status "${app}-server" >/dev/null then ynh_script_progression "Removing ${app}-server service integration..." diff --git a/scripts/restore b/scripts/restore index aaffc2f..23fa109 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -43,7 +42,6 @@ ynh_psql_db_shell < "./db.sql" #================================================= ynh_script_progression "Configuring logrotate to manage application logfiles" -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate touch /var/log/$app/${app}-server.log diff --git a/scripts/upgrade b/scripts/upgrade index e5effb9..c3d985e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,7 +25,6 @@ ynh_setup_source --dest_dir="$install_dir/front" --source_id="front" --full_repl #================================================= ynh_script_progression "Upgrading NGINX web server configuration..." -# Create a dedicated NGINX config ynh_config_add --template="funkwhale_proxy.conf" --destination="/etc/nginx/conf.d/$domain.d/funkwhale_proxy.conf" ynh_config_add_nginx @@ -72,9 +71,6 @@ ynh_script_progression "Updating configuration..." ynh_config_add --template="env.prod" --destination="$install_dir/config/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/config/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config/.env" - #================================================= # UPGRADE FUNKWHALE #================================================= @@ -98,7 +94,6 @@ popd #================================================= ynh_script_progression "Configuring logrotate to manage application logfiles" -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate touch /var/log/$app/${app}-server.log @@ -141,7 +136,6 @@ ynh_systemctl --service="${app}-worker" --action="start" --log_path="systemd" -- #================================================= ynh_script_progression "Reconfiguring Fail2Ban..." -# Create a dedicated Fail2Ban config ynh_config_add_fail2ban --logpath="/var/log/nginx/$domain-access.log" --failregex=".* \"POST /api/v1/token/ HTTP/1.1\" 400 68.*$" #=================================================