From 2c2ccddbe41cc552f691b25e1048b14e6caf7c3c Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Mon, 4 Aug 2025 11:02:23 +0200 Subject: [PATCH] Update customizable_post_install.sh --- .../post_install/customizable_post_install.sh | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/scripts/post_install/customizable_post_install.sh b/scripts/post_install/customizable_post_install.sh index 535718f..c8f7a03 100644 --- a/scripts/post_install/customizable_post_install.sh +++ b/scripts/post_install/customizable_post_install.sh @@ -81,6 +81,32 @@ register_tool() { jq --arg t "$tool" --argjson v "$state" '.[$t]=$v' "$TOOLS_JSON" > "$TOOLS_JSON.tmp" && mv "$TOOLS_JSON.tmp" "$TOOLS_JSON" } + + +check_extremeshok_warning() { + local marker_file="/etc/extremeshok" + + if [[ -f "$marker_file" ]]; then + dialog --backtitle --title "Extremeshok Post-Install Detected" \ + --yesno "$(translate "It appears that you have already executed the 'xshok-proxmox' post-install script on this system.")\n\n\ +$(translate "If you continue, some adjustments may be duplicated or conflict with those already made by xshok.")\n\n\ +$(translate "Do you want to continue anyway?")" 13 70 + + local response=$? + if [[ $response -ne 0 ]]; then + show_proxmenux_logo + msg_warn "$(translate "Action cancelled due to previous xshok-proxmox modifications.")" + echo -e + msg_success "$(translate "Press Enter to return to menu...")" + read -r + exit 1 + fi + fi +} + + + + # ========================================================== @@ -3644,6 +3670,6 @@ done - +check_extremeshok_warning main_menu