diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 4c5df73d..1f34cc10 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -821,14 +821,22 @@ install_normal_version() { cp "./version.txt" "$LOCAL_VERSION_FILE" cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + # Wipe the scripts tree before copying so any file removed upstream + # (renamed, consolidated, deprecated) disappears from the user install. + # Only $BASE_DIR/scripts/ is cleared; config.json, cache.json, + # components_status.json, version.txt, beta_version.txt, monitor.db, + # smart/, oci/ and the AppImage live outside this path and are preserved. + rm -rf "$BASE_DIR/scripts" mkdir -p "$BASE_DIR/scripts" cp -r "./scripts/"* "$BASE_DIR/scripts/" - chmod -R +x "$BASE_DIR/scripts/" + # Only .sh files need the executable bit. Applying +x recursively would + # also flag README.md, .json, .py etc. as executable for no reason. + find "$BASE_DIR/scripts" -type f -name '*.sh' -exec chmod +x {} + chmod +x "$BASE_DIR/install_proxmenux.sh" msg_ok "Necessary files created." chmod +x "$INSTALL_DIR/$MENU_SCRIPT" - + ((current_step++)) show_progress $current_step $total_steps "Installing ProxMenux Monitor" diff --git a/install_proxmenux_beta.sh b/install_proxmenux_beta.sh index 84d7d6a1..1a2a9fb5 100644 --- a/install_proxmenux_beta.sh +++ b/install_proxmenux_beta.sh @@ -576,9 +576,17 @@ install_beta() { cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" 2>/dev/null || true cp "./install_proxmenux_beta.sh" "$BASE_DIR/install_proxmenux_beta.sh" 2>/dev/null || true + # Wipe the scripts tree before copying so any file removed upstream + # (renamed, consolidated, deprecated) disappears from the user install. + # Only $BASE_DIR/scripts/ is cleared; config.json, cache.json, + # components_status.json, version.txt, beta_version.txt, monitor.db, + # smart/, oci/ and the AppImage live outside this path and are preserved. + rm -rf "$BASE_DIR/scripts" mkdir -p "$BASE_DIR/scripts" cp -r "./scripts/"* "$BASE_DIR/scripts/" - chmod -R +x "$BASE_DIR/scripts/" + # Only .sh files need the executable bit. Applying +x recursively would + # also flag README.md, .json, .py etc. as executable for no reason. + find "$BASE_DIR/scripts" -type f -name '*.sh' -exec chmod +x {} + if [ -d "./oci" ]; then mkdir -p "$BASE_DIR/oci"