From 684b38afeff3bf9bcc03a8fc456667ad6285753c Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Wed, 15 Jan 2025 01:11:59 +0800 Subject: [PATCH] prevent deletion if tricky store add webui/action in future --- module/post-fs-data.sh | 4 ++-- module/uninstall.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index eca7bdd..80f4489 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -15,5 +15,5 @@ if [ ! -d "$TS" ] || [ -f "$TS/remove" ]; then fi fi -rm -f "$TS/action.sh" -rm -rf "$TS/webroot" \ No newline at end of file +[ -L "$TS/webroot" ] && rm -f "$TS/webroot" +[ -L "$TS/action.sh" ] && rm -f "$TS/action.sh" diff --git a/module/uninstall.sh b/module/uninstall.sh index 4146dac..1ba56e8 100644 --- a/module/uninstall.sh +++ b/module/uninstall.sh @@ -11,7 +11,7 @@ fi rm -rf "/data/adb/modules/.TA_utl" rm -f "/data/adb/boot_hash" if [ -d "$TS" ]; then - rm -f "$TS/action.sh" - rm -rf "$TS/webroot" + [ -L "$TS/webroot" ] && rm -f "$TS/webroot" + [ -L "$TS/action.sh" ] && rm -f "$TS/action.sh" fi xxd -r -p "$MODPATH/common/.default" | base64 -d > "$SCRIPT_DIR/keybox.xml"