Update customizable_post_install.sh

This commit is contained in:
MacRimi 2025-05-02 22:12:59 +02:00
parent a2f5ce694d
commit aa7053da28

View File

@ -666,36 +666,70 @@ configure_time_sync() {
install_system_utils() { install_system_utils() {
msg_info2 "$(translate "Installing common system utilities...")" msg_info2 "$(translate "Installing common system utilities...")"
if [[ "$LANGUAGE" != "en" ]]; then
msg_lang "$(translate "Generating automatic translations...")"
fi
packages=( packages_list=(
axel dialog dos2unix grc htop btop iftop iotop axel "$(translate "Download accelerator")" OFF
iperf3 ipset iptraf-ng mlocate msr-tools net-tools dialog "$(translate "Console GUI dialogs")" OFF
sshpass tmux unzip zip libguestfs-tools dos2unix "$(translate "Convert DOS/Unix text files")" OFF
grc "$(translate "Generic log/command colorizer")" OFF
htop "$(translate "Interactive process viewer")" OFF
btop "$(translate "Modern resource monitor")" OFF
iftop "$(translate "Real-time network usage")" OFF
iotop "$(translate "Monitor disk I/O usage")" OFF
iperf3 "$(translate "Network performance testing")" OFF
ipset "$(translate "Manage IP sets")" OFF
iptraf-ng "$(translate "Network monitoring tool")" OFF
mlocate "$(translate "Locate files quickly")" OFF
msr-tools "$(translate "Access CPU MSRs")" OFF
net-tools "$(translate "Legacy networking tools")" OFF
sshpass "$(translate "Non-interactive SSH login")" OFF
tmux "$(translate "Terminal multiplexer")" OFF
unzip "$(translate "Extract ZIP files")" OFF
zip "$(translate "Create ZIP files")" OFF
libguestfs-tools "$(translate "VM disk utilities")" OFF
aria2c "$(translate "Multi-source downloader")" OFF
cabextract "$(translate "Extract CAB files")" OFF
wimlib-imagex "$(translate "Manage WIM images")" OFF
genisoimage "$(translate "Create ISO images")" OFF
chntpw "$(translate "Edit Windows registry/passwords")" OFF
) )
packages_to_install=()
cleanup
for package in "${packages[@]}"; do choices=$(whiptail --title "System Utilities" \
if ! dpkg -s "$package" >/dev/null 2>&1; then --checklist "$(translate "Select the system utilities to install:")" 20 70 12 \
packages_to_install+=("$package") "${packages_list[@]}" 3>&1 1>&2 2>&3)
if [ $? -ne 0 ]; then
msg_warn "$(translate "Installation cancelled by user")"
return
fi
selected_packages=($choices)
if [ ${#selected_packages[@]} -eq 0 ]; then
msg_warn "$(translate "No packages selected for installation")"
return
fi fi
done
if [ ${#packages_to_install[@]} -eq 0 ]; then
msg_ok "$(translate "System utilities installed successfully")"
else
tput civis tput civis
tput sc tput sc
for package in "${packages_to_install[@]}"; do for package in "${selected_packages[@]}"; do
if dpkg -s "$package" >/dev/null 2>&1; then
continue
fi
tput rc tput rc
tput ed tput ed
row=$(( $(tput lines) - 6 )) row=$(( $(tput lines) - 6 ))
tput cup $row 0; echo "$(translate "Installing system utilities...")" tput cup $row 0; echo "$(translate "Installing system utilities...")"
tput cup $((row + 1)) 0; echo "──────────────────────────────────────────────" tput cup $((row + 1)) 0; echo "──────────────────────────────────────────────"
@ -703,7 +737,6 @@ install_system_utils() {
tput cup $((row + 3)) 0; echo "Progress: [ ] 0%" tput cup $((row + 3)) 0; echo "Progress: [ ] 0%"
tput cup $((row + 4)) 0; echo "──────────────────────────────────────────────" tput cup $((row + 4)) 0; echo "──────────────────────────────────────────────"
for i in $(seq 1 10); do for i in $(seq 1 10); do
progress=$((i * 10)) progress=$((i * 10))
tput cup $((row + 3)) 9 tput cup $((row + 3)) 9
@ -711,17 +744,13 @@ install_system_utils() {
sleep 0.2 sleep 0.2
done done
/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' install "$package" > /dev/null 2>&1 /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' install "$package" > /dev/null 2>&1
done done
tput rc tput rc
tput ed tput ed
tput cnorm tput cnorm
msg_ok "$(translate "System utilities installed successfully")" msg_ok "$(translate "System utilities installed successfully")"
fi
msg_success "$(translate "Common system utilities installation completed")" msg_success "$(translate "Common system utilities installation completed")"
} }
@ -729,6 +758,7 @@ install_system_utils() {
# ========================================================== # ==========================================================