From f27ce2bdd96454ef3c8937d6e315b81ee9b59478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 25 May 2024 22:20:53 +0200 Subject: [PATCH] Cleanup packagingv2 --- scripts/_common.sh | 5 ----- scripts/install | 3 ++- scripts/restore | 3 ++- scripts/upgrade | 3 ++- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index bc71998..0cd3e6b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,11 +8,6 @@ RESTIC_VERSION="0.16.2" systemd_services_suffixes=( "" "_check" "_check_read_data" ) -# Install restic if restic is not here -install_restic () { - ynh_setup_source --source_id=main --dest_dir="$install_dir" - chmod +x "$install_dir/restic" -} _gen_and_save_public_key() { public_key="" diff --git a/scripts/install b/scripts/install index 0afffb8..63575b6 100755 --- a/scripts/install +++ b/scripts/install @@ -19,7 +19,8 @@ ynh_app_setting_set --app=$app --key=passphrase --value="$passphrase" #================================================= ynh_script_progression --message="Installing Restic..." --weight=7 -install_restic +ynh_setup_source --source_id=main --dest_dir="$install_dir" +chmod +x "$install_dir/restic" _gen_and_save_public_key diff --git a/scripts/restore b/scripts/restore index 1ad8759..d3a8fc9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,7 +15,8 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -install_restic +ynh_setup_source --source_id=main --dest_dir="$install_dir" +chmod +x "$install_dir/restic" chown -R "$app:$app" "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 832b45e..5144da8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,8 @@ fi #================================================= ynh_script_progression --message="Installing restic binary" --weight=7 -install_restic +ynh_setup_source --source_id=main --dest_dir="$install_dir" +chmod +x "$install_dir/restic" #================================================= # CREATE APP USER