add Java JDK/JRE selection and patches

- Created dedicated `extras/java.sh` module for modular Temurin/Adoptium repository handling and isolated GPG key management.
- Implemented selective JRE/JDK installation paths: Gaming (Minecraft) vs Development environments with version control selectors.
- Enhanced user group membership logic (`_ensure_sudo_group`) to auto-configure administrative privileges on fresh installs.
- Introduced maintenance-friendly passwordless sudo for `apt`, `systemctl`, and shutdown commands via `/etc/sudoers.d/`.
- Added home directory ownership repair utility to fix root-owned files in user directories after improper `sudo` usage.
- Enabled visual password feedback (`pwfeedback`) toggle for enhanced terminal usability during authentication prompts.
- Refactored Debian 13/Trixie repository sourcing logic to ensure idempotency and prevent backports/duplicate sources conflicts.
- Updated Bullseye legacy modules (extras.sh, repos.sh) to exclude deprecated packages (`hx`, `vscodium`) and enforce Firefox ESR defaults.
- Cleaned repository configurations by removing obsolete `bullseye-updates` source entries to prevent dependency conflicts.
- Implemented NVTOP conditional detection logic ensuring display only on active Nvidia drivers or supported architectures (Trixie/Bookworm).
- Corrected `/modules/bullseye/extras.sh` menu mappings (Programming, Dev Tools) and verified package lists excluding incompatible tools (`hx`, `vscodium`).
- Integrated ClamAV security module with daemon state management and background scan execution flows in all Security menus.
- update README.md
This commit is contained in:
stornic56
2026-06-13 19:21:55 -05:00
committed by GitHub
parent 656f045163
commit 872f92d6b4
16 changed files with 1037 additions and 357 deletions
+21
View File
@@ -8,3 +8,24 @@ _inst() {
_state() {
is_installed "$1" && echo "ON" || echo "OFF"
}
_install_clamav() {
if is_installed "clamav"; then
echo "ClamAV already installed."
return
fi
_run_install "clamav"
echo -e "${GREEN}ClamAV installed.${NC}"
if _confirm "ClamAV" "Update virus signatures now (freshclam)?"; then
sudo systemctl stop clamav-freshclam 2>/dev/null || true
sudo freshclam || true
sudo systemctl start clamav-freshclam 2>/dev/null || true
fi
if _confirm "ClamAV" "Run quick scan on /bin to verify engine works?"; then
echo "Running background scan on /bin..."
sudo clamscan --recursive --infected /bin &
echo "Scan running in background (PID $!). Check results later."
fi
}
+6
View File
@@ -17,6 +17,8 @@ _cat_dev() {
local pip_state; pip_state=$(_state "python3-pip")
local redis_state; redis_state=$(_state "redis-server")
local sqlite_state; sqlite_state=$(_state "sqlite3")
local jdk_desc; jdk_desc=$(_any_jdk_installed_desc)
local jdk_state; jdk_state=$(_any_jdk_state)
local TUI_ANCHO_REFORZADO=$((TUI_ANCHO + 6))
local choices
@@ -35,6 +37,7 @@ _cat_dev() {
"python3-pip" "Python 3 pip + venv + dev$(_inst python3-pip)" "$pip_state" \
"redis-server" "Redis key-value store$(_inst redis-server)" "$redis_state" \
"sqlite3" "SQLite database engine$(_inst sqlite3)" "$sqlite_state" \
"openjdk-dev-env" "Adoptium Temurin JDK (17, 21, 25 LTS)${jdk_desc}" "${jdk_state}" \
3>&1 1>&2 2>&3)
clear
@@ -65,6 +68,9 @@ _cat_dev() {
echo "Docker already installed."
fi
;;
openjdk-dev-env)
_install_dev_java
;;
*)
if ! is_installed "$pkg"; then
_run_install "$pkg"
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env bash
# java.sh — Adoptium Temurin repository setup and Java version selectors
# License GPL v3
_ensure_adoptium_repo() {
[ -f /etc/apt/sources.list.d/adoptium.list ] && return 0
local deps=()
! is_installed "wget" && deps+=("wget")
! is_installed "apt-transport-https" && deps+=("apt-transport-https")
! is_installed "gpg" && deps+=("gpg")
[ ${#deps[@]} -gt 0 ] && _run_install_batch "${deps[@]}"
wget -qO - "https://packages.adoptium.net/artifactory/api/gpg/key/public" \
| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg 2>/dev/null
local codename
codename=$(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release)
echo "deb https://packages.adoptium.net/artifactory/deb ${codename} main" \
| sudo tee /etc/apt/sources.list.d/adoptium.list > /dev/null
sudo apt update \
-o Dir::Etc::sourcelist=/etc/apt/sources.list.d/adoptium.list \
-o Dir::Etc::sourceparts="-" \
2>/dev/null || true
}
_install_gaming_java() {
local ver
ver=$(whiptail --title "Java Runtimes for Gaming" --menu \
"Select Java version:" 12 65 3 \
"8" "Java 8 — For classic mods & Minecraft <= 1.16.5" \
"17" "Java 17 — For Minecraft era 1.17 to 1.20.4" \
"21" "Java 21 — For modern Minecraft >= 1.20.5 & 1.21+" \
3>&1 1>&2 2>&3)
[ -z "$ver" ] && { echo "No Java version selected."; return; }
_ensure_adoptium_repo
_run_install "temurin-${ver}-jre"
}
_install_dev_java() {
local ver
ver=$(whiptail --title "Java Development Kits (JDK)" --menu \
"Select JDK version:" 12 60 3 \
"17" "Java 17 LTS Development Kit" \
"21" "Java 21 LTS Development Kit" \
"25" "Java 25 LTS Development Kit" \
3>&1 1>&2 2>&3)
[ -z "$ver" ] && { echo "No JDK version selected."; return; }
_ensure_adoptium_repo
_run_install "temurin-${ver}-jdk"
}
_any_jdk_installed_desc() {
local inst
inst=$(dpkg -l 'temurin-*-jdk' 2>/dev/null | awk '/^ii/ {print $2; exit}')
[ -n "$inst" ] && echo " ($inst installed)" || echo ""
}
_any_jdk_state() {
dpkg -l 'temurin-*-jdk' 2>/dev/null | grep -q '^ii' && echo "ON" || echo "OFF"
}
+6 -1
View File
@@ -9,16 +9,18 @@ _cat_security() {
local zenmap_state; zenmap_state=$(_state "zenmap")
local fail2ban_state; fail2ban_state=$(_state "fail2ban")
local ufw_state; ufw_state=$(_state "ufw")
local clamav_state; clamav_state=$(_state "clamav")
local TUI_ANCHO_REFORZADO=$((TUI_ANCHO + 6))
local choices
choices=$(whiptail --title "Security & Networking" --checklist \
"Select security and networking tools (5 items):" $TUI_ALTO $TUI_ANCHO_REFORZADO $TUI_ALTO_LISTA \
"Select security and networking tools (6 items):" $TUI_ALTO $TUI_ANCHO_REFORZADO $TUI_ALTO_LISTA \
"wireshark" "Network protocol analyzer (GUI)$(_inst wireshark)" "$wireshark_state" \
"tcpdump" "Command-line packet analyzer$(_inst tcpdump)" "$tcpdump_state" \
"zenmap" "Network scanner GUI (Nmap frontend)$(_inst zenmap)" "$zenmap_state" \
"fail2ban" "Brute-force protection daemon$(_inst fail2ban)" "$fail2ban_state" \
"ufw" "Uncomplicated firewall$(_inst ufw)" "$ufw_state" \
"clamav" "Antivirus engine (ClamAV)$(_inst clamav)" "$clamav_state" \
3>&1 1>&2 2>&3)
clear
@@ -31,6 +33,9 @@ _cat_security() {
zenmap)
install_backports_or_stable zenmap
;;
clamav)
_install_clamav
;;
*)
if ! is_installed "$pkg"; then
_run_install "$pkg"