From 59bd67384e90cb24eb53dd0a67c264731e240776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 23 Sep 2023 15:15:22 +0200 Subject: [PATCH] cleaning --- scripts/install | 1 - scripts/restore | 7 ------- scripts/upgrade | 24 +++--------------------- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/scripts/install b/scripts/install index b786d7f..557e8f4 100755 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,6 @@ chown root:$admin "$install_dir/code-server.env" #================================================= # SET PERMISSION FOR THE USER #================================================= -ynh_permission_update --permission="main" --add="$admin" chown -R $admin:$admin "$data_dir" diff --git a/scripts/restore b/scripts/restore index b12de36..a7250e6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,13 +46,6 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" yunohost service add $app --description="VS Code Server" --log="/var/log/$app/$app.log" -#================================================= -# SET PERMISSION FOR THE USER -#================================================= -ynh_permission_update --permission="main" --add="$admin" - -chown -R $admin:$admin "$data_dir" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9ef5a47..b4259b9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,14 +82,6 @@ chmod -R o-rwx "$install_dir" chown -R root:$admin "$install_dir" chmod +x "$install_dir/bin/code-server" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPDATE A CONFIG FILE #================================================= @@ -111,30 +103,20 @@ chown $admin:$admin "$install_dir/config.yaml" "$install_dir/code-server.env" #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 - # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="VS Code Server" --log="/var/log/$app/$app.log" #================================================= # SET PERMISSION FOR THE USER #================================================= -ynh_permission_update --permission="main" --add="$admin" chown -R $admin:$admin "$data_dir"