From 839c6b9992d5c99d59bb4d4376dd1385701f9aab Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 21 Jun 2024 04:02:20 +0200 Subject: [PATCH] add autopatch: do not remove logs on app removal --- autopatches/patches/delete-log-removal/patch.sh | 5 +++++ autopatches/patches/delete-log-removal/pr_body.md | 3 +++ autopatches/patches/delete-log-removal/pr_title.md | 1 + 3 files changed, 9 insertions(+) create mode 100644 autopatches/patches/delete-log-removal/patch.sh create mode 100644 autopatches/patches/delete-log-removal/pr_body.md create mode 100644 autopatches/patches/delete-log-removal/pr_title.md diff --git a/autopatches/patches/delete-log-removal/patch.sh b/autopatches/patches/delete-log-removal/patch.sh new file mode 100644 index 0000000..dda9574 --- /dev/null +++ b/autopatches/patches/delete-log-removal/patch.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +sed -E "/(ynh_secure_remove|ynh_safe_rm|rm).*(\/var\/log\/)/d" --i scripts/remove + +git add scripts/remove diff --git a/autopatches/patches/delete-log-removal/pr_body.md b/autopatches/patches/delete-log-removal/pr_body.md new file mode 100644 index 0000000..704d4a6 --- /dev/null +++ b/autopatches/patches/delete-log-removal/pr_body.md @@ -0,0 +1,3 @@ +This is an ***automated*** patch to fix the following: + +Do not delete logs on app removal, else they will be erased if the app upgrade fails. This is handled by the core. diff --git a/autopatches/patches/delete-log-removal/pr_title.md b/autopatches/patches/delete-log-removal/pr_title.md new file mode 100644 index 0000000..8bfe3c6 --- /dev/null +++ b/autopatches/patches/delete-log-removal/pr_title.md @@ -0,0 +1 @@ +Do not delete logs on app removal