From adf65cd088e1c362d7f31215084ba6d98cf2ae6a Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 13 Mar 2025 12:17:49 +0100 Subject: [PATCH] Update install.sh --- src/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/install.sh b/src/install.sh index 80159f8..003b302 100644 --- a/src/install.sh +++ b/src/install.sh @@ -681,9 +681,10 @@ updateXML() { sed -i "s/SERVERSTANDARD<\/Value>/SERVER${EDITION^^}<\/Value>/g" "$asset" fi - sed -i '//,/<\/ProductKey>/d' "$asset" - cat "$asset" - exit + if [ -n "$KEY" ]; then + sed -i '//,/<\/ProductKey>/d' "$asset" + sed -i "s/<\/UserData>/ \n ${KEY}<\/Key>\n OnError<\/WillShowUI>\n <\/ProductKey>\n <\/UserData>/g" "$asset" + fi return 0 }