From 7e15c35603e81903f8e925ed6dca2748a8403652 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 12 Jan 2020 21:42:15 +0100 Subject: [PATCH 1/2] fix ynh_secure_remove --- scripts/install | 6 +++--- scripts/remove | 2 +- scripts/upgrade | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index e18e24c..55ee123 100644 --- a/scripts/install +++ b/scripts/install @@ -136,9 +136,9 @@ popd cp -a "$final_path"/build/target/release/. "$final_path"/live/. # Remove build files and rustup -ynh_secure_remove --file="$final_path/build/" -ynh_secure_remove --file="$final_path/.cargo/" -ynh_secure_remove --file="$final_path/.rustup/" +ynh_secure_remove --file="$final_path/build" +ynh_secure_remove --file="$final_path/.cargo" +ynh_secure_remove --file="$final_path/.rustup" #================================================= # SETUP SYSTEMD diff --git a/scripts/remove b/scripts/remove index bce5632..aef4bb4 100644 --- a/scripts/remove +++ b/scripts/remove @@ -88,7 +88,7 @@ ynh_remove_fail2ban_config #================================================= # Remove the log files -ynh_secure_remove --file="/var/log/$app/" +ynh_secure_remove --file="/var/log/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index b19f400..29ee98c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -143,9 +143,9 @@ then cp -a "$final_path"/build/target/release/. "$final_path"/live/. # Remove build files and rustup - ynh_secure_remove --file="$final_path/build/" - ynh_secure_remove --file="$final_path/.cargo/" - ynh_secure_remove --file="$final_path/.rustup/" + ynh_secure_remove --file="$final_path/build" + ynh_secure_remove --file="$final_path/.cargo" + ynh_secure_remove --file="$final_path/.rustup" fi #================================================= From 185d19c12432d9ba9a9bf389707b21cd430d64fc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 12 Jan 2020 21:51:59 +0100 Subject: [PATCH 2/2] Apply example_ynh --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index d60119c..3565ea3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -106,6 +106,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_print_info --message="Restoring the systemd configuration..." ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +systemctl enable $app.service #================================================= # INTEGRATE SERVICE IN YUNOHOST