From da39f0d6e59fcf4ebc3c0aeb6187db5ad9837dda Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 25 Nov 2023 08:39:48 +0100 Subject: [PATCH] cleaning --- scripts/backup | 5 ----- scripts/install | 6 +----- scripts/remove | 1 - scripts/restore | 5 ----- scripts/upgrade | 4 ---- 5 files changed, 1 insertion(+), 20 deletions(-) diff --git a/scripts/backup b/scripts/backup index 20fe254..ef6ccfe 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,11 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fill the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls takes basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= diff --git a/scripts/install b/scripts/install index ab9b928..7794a67 100755 --- a/scripts/install +++ b/scripts/install @@ -40,10 +40,6 @@ ynh_add_systemd_config yunohost service add $app --description="Peertube remote runner" --log="/var/log/$app/$app.log" -#================================================= -# APP INITIAL CONFIGURATION -#================================================= - #================================================= # GENERIC FINALIZATION #================================================= @@ -67,10 +63,10 @@ ynh_app_setting_set --app=$app --key='runner_id' --value=$runner_id pushd "$install_dir" ynh_use_nodejs ynh_exec_as $app env $ynh_node_load_PATH NODE_CONFIG_DIR="$install_dir/config" NODE_ENV=production $ynh_node "$install_dir/node_modules/@peertube/peertube-runner" register --url $peertube_url --registration-token $runner_token --runner-name $app\_$runner_id - popd #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 5322e85..6df6e46 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,7 +23,6 @@ ynh_exec_as $app env $ynh_node_load_PATH NODE_CONFIG_DIR="$install_dir/config" N #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 - if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=1 diff --git a/scripts/restore b/scripts/restore index 39c6ac8..eaba07e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,9 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -# $install_dir will automatically be initialized with some decent -# permission by default ... however, you may need to recursively reapply -# ownership to all files such as after the ynh_setup_source step chown -R $app:www-data "$install_dir" #================================================= @@ -51,8 +48,6 @@ popd #================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet diff --git a/scripts/upgrade b/scripts/upgrade index b007f98..f55dc48 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,10 +40,6 @@ fi #================================================= ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 -# This should be a literal copypasta of what happened in the install's "System configuration" section - -ynh_add_nginx_config - ynh_add_systemd_config yunohost service add $app --description="Peertube remote runner" --log="/var/log/$app/$app.log"