From 5d5de37abcf91d3dfbc429b2024104602deee7ac Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 22:41:47 +0100 Subject: [PATCH 1/7] Remove fix for the about page --- scripts/install | 3 --- scripts/upgrade | 3 --- 2 files changed, 6 deletions(-) diff --git a/scripts/install b/scripts/install index 59043c6..d0dc75e 100644 --- a/scripts/install +++ b/scripts/install @@ -182,9 +182,6 @@ npm install typescript@>=2.0 --save npm install ts-node popd -#Fix a error in the public page -ynh_replace_string "res.writeHead(200)" "res.writeHead(200, {\"content-type\": \"text/html\",})" "$final_path/src/distbin-html/public.ts" - chown -R $app:$app $final_path #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 79a3781..4d0575a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,9 +125,6 @@ npm install typescript@>=2.0 --save npm install ts-node popd -#Fix a error in the public page -ynh_replace_string "res.writeHead(200)" "res.writeHead(200, {\"content-type\": \"text/html\",})" "$final_path/src/distbin-html/public.ts" - ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. #ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" From aaa1c700a3afe513a078a456e52b6453dce94437 Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 23:08:31 +0100 Subject: [PATCH 2/7] Add remove temp file when application removed --- scripts/remove | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/remove b/scripts/remove index 7c8469b..5358748 100644 --- a/scripts/remove +++ b/scripts/remove @@ -113,6 +113,10 @@ fi # Remove the log files ynh_secure_remove "/var/log/$app/" +# remove tmp files +ynh_secure_remove "/tmp/*" +ynh_secure_remove "/var/tmp/*" + #================================================= # GENERIC FINALIZATION #================================================= From 432c20a8e32d50aaf0a18f2f6ac1397900d2a3ea Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 23:16:33 +0100 Subject: [PATCH 3/7] Fix tmp files remove --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 5358748..4c9b3da 100644 --- a/scripts/remove +++ b/scripts/remove @@ -114,7 +114,7 @@ fi ynh_secure_remove "/var/log/$app/" # remove tmp files -ynh_secure_remove "/tmp/*" +sudo -u $app "/tmp/*" ynh_secure_remove "/var/tmp/*" #================================================= From 39242762e744b981cebb896eb2fb48aca639454f Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 23:22:07 +0100 Subject: [PATCH 4/7] Fix remove temporary files --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 4c9b3da..7ced0fd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -114,7 +114,7 @@ fi ynh_secure_remove "/var/log/$app/" # remove tmp files -sudo -u $app "/tmp/*" +sudo -u $app "rm -r /tmp/*" ynh_secure_remove "/var/tmp/*" #================================================= From 87069f3ba8ba524dba9f5d88428fc2c9ce7b08eb Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 23:23:09 +0100 Subject: [PATCH 5/7] Fix tmp files remove --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 7ced0fd..860c0df 100644 --- a/scripts/remove +++ b/scripts/remove @@ -114,7 +114,7 @@ fi ynh_secure_remove "/var/log/$app/" # remove tmp files -sudo -u $app "rm -r /tmp/*" +sudo -u $app rm -r /tmp/* ynh_secure_remove "/var/tmp/*" #================================================= From 85e26f5dcdd83b77f878ce43d80a10ddc4605898 Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 23:28:22 +0100 Subject: [PATCH 6/7] add force remove for no prompt on not owned files --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 860c0df..71aa8ee 100644 --- a/scripts/remove +++ b/scripts/remove @@ -114,7 +114,7 @@ fi ynh_secure_remove "/var/log/$app/" # remove tmp files -sudo -u $app rm -r /tmp/* +sudo -u $app rm -rf /tmp/* ynh_secure_remove "/var/tmp/*" #================================================= From 51ce216874dd2696180a556407a039f5cfa9858a Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 23:31:51 +0100 Subject: [PATCH 7/7] remove tmp before removing user folder in /var/www/$app --- scripts/remove | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/remove b/scripts/remove index 71aa8ee..c64c458 100644 --- a/scripts/remove +++ b/scripts/remove @@ -61,6 +61,10 @@ ynh_remove_nodejs # REMOVE APP MAIN DIR #================================================= +# remove tmp files +sudo -u $app rm -rf /tmp/* +ynh_secure_remove "/var/tmp/*" + # Remove the app directory securely ynh_secure_remove "$final_path" @@ -113,10 +117,6 @@ fi # Remove the log files ynh_secure_remove "/var/log/$app/" -# remove tmp files -sudo -u $app rm -rf /tmp/* -ynh_secure_remove "/var/tmp/*" - #================================================= # GENERIC FINALIZATION #=================================================