mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +00:00
Update script post-install
This commit is contained in:
parent
7df05a3597
commit
f4cc11cb3a
@ -199,21 +199,28 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# update proxmox and install system utils
|
# update proxmox and install system utils
|
||||||
msg_info "$(translate "Performing system upgrade...")"
|
# msg_info "$(translate "Performing system upgrade...")"
|
||||||
apt-get install pv -y > /dev/null 2>&1
|
apt-get install pv -y > /dev/null 2>&1
|
||||||
total_packages=$(apt-get -s dist-upgrade | grep "^Inst" | wc -l)
|
total_packages=$(apt-get -s dist-upgrade | grep "^Inst" | wc -l)
|
||||||
|
|
||||||
if [ "$total_packages" -eq 0 ]; then
|
if [ "$total_packages" -eq 0 ]; then
|
||||||
total_packages=1
|
total_packages=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
upgraded_packages=0
|
upgraded_packages=0
|
||||||
|
|
||||||
(
|
(
|
||||||
/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' dist-upgrade 2>&1 | \
|
/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' dist-upgrade 2>&1 | \
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ $line == "Setting up"* ]] || [[ $line == "Unpacking"* ]]; then
|
if [[ "$line" =~ ^(Setting up|Unpacking|Preparing to unpack|Processing triggers for) ]]; then
|
||||||
((upgraded_packages++))
|
((upgraded_packages++))
|
||||||
|
|
||||||
progress=$((upgraded_packages * 100 / total_packages))
|
progress=$((upgraded_packages * 100 / total_packages))
|
||||||
printf "\r$(translate "Progress"): [%-50s] %3d%%" $(printf "#%.0s" $(seq 1 $((progress/2)))) $progress
|
if [ "$progress" -gt 100 ]; then
|
||||||
|
progress=100
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\r\033[KProgress: [%-50s] %3d%%" "$(printf "#%.0s" $(seq 1 $((progress/2))))" "$progress"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
@ -224,7 +231,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# update PVE application manager
|
# update PVE application manager
|
||||||
msg_info "$(translate "Updating PVE application manager, patience...")"
|
# msg_info "$(translate "Updating PVE application manager, patience...")"
|
||||||
total_steps=$(pveam update 2>&1 | grep -E "^(Downloading|Importing)" | wc -l)
|
total_steps=$(pveam update 2>&1 | grep -E "^(Downloading|Importing)" | wc -l)
|
||||||
[ $total_steps -eq 0 ] && total_steps=1
|
[ $total_steps -eq 0 ] && total_steps=1
|
||||||
current_step=0
|
current_step=0
|
||||||
@ -591,9 +598,9 @@ install_system_utils() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ ${#packages_to_install[@]} -eq 0 ]; then
|
if [ ${#packages_to_install[@]} -eq 0 ]; then
|
||||||
msg_ok "$(translate "Missing system utilities installed successfully")"
|
msg_ok "$(translate "System utilities installed successfully")"
|
||||||
else
|
else
|
||||||
msg_info "$(translate "Installing missing system utilities...")"
|
|
||||||
(
|
(
|
||||||
for package in "${packages_to_install[@]}"; do
|
for package in "${packages_to_install[@]}"; do
|
||||||
/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
|
||||||
@ -605,7 +612,7 @@ install_system_utils() {
|
|||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
printf "\r%-$(($(tput cols)-1))s\r" " "
|
printf "\r%-$(($(tput cols)-1))s\r" " "
|
||||||
msg_ok "$(translate "Missing system utilities installed successfully")"
|
msg_ok "$(translate "System utilities installed successfully")"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1596,6 +1603,7 @@ enable_vfio_iommu() {
|
|||||||
# Blacklist conflicting drivers (avoid duplicates)
|
# Blacklist conflicting drivers (avoid duplicates)
|
||||||
local blacklist_file="/etc/modprobe.d/blacklist.conf"
|
local blacklist_file="/etc/modprobe.d/blacklist.conf"
|
||||||
msg_info "$(translate "Checking conflicting drivers blacklist...")"
|
msg_info "$(translate "Checking conflicting drivers blacklist...")"
|
||||||
|
touch "$blacklist_file"
|
||||||
local blacklist_drivers=("nouveau" "lbm-nouveau" "amdgpu" "radeon" "nvidia" "nvidiafb")
|
local blacklist_drivers=("nouveau" "lbm-nouveau" "amdgpu" "radeon" "nvidia" "nvidiafb")
|
||||||
|
|
||||||
for driver in "${blacklist_drivers[@]}"; do
|
for driver in "${blacklist_drivers[@]}"; do
|
||||||
@ -2035,7 +2043,7 @@ configure_fastfetch() {
|
|||||||
1)
|
1)
|
||||||
msg_info "$(translate "Downloading ProxMenux logo...")"
|
msg_info "$(translate "Downloading ProxMenux logo...")"
|
||||||
local proxmenux_logo_path="$logos_dir/ProxMenux.txt"
|
local proxmenux_logo_path="$logos_dir/ProxMenux.txt"
|
||||||
if wget -qO "$proxmenux_logo_path" "https://raw.githubusercontent.com/MacRimi/ProxMenux/main/images/logos_txt/ProxMenux.txt"; then
|
if wget -qO "$proxmenux_logo_path" "https://raw.githubusercontent.com/MacRimi/ProxMenux/main/images/logos_txt/logo.txt"; then
|
||||||
jq --arg path "$proxmenux_logo_path" '. + {logo: $path}' "$fastfetch_config" > "${fastfetch_config}.tmp" && mv "${fastfetch_config}.tmp" "$fastfetch_config"
|
jq --arg path "$proxmenux_logo_path" '. + {logo: $path}' "$fastfetch_config" > "${fastfetch_config}.tmp" && mv "${fastfetch_config}.tmp" "$fastfetch_config"
|
||||||
msg_ok "$(translate "ProxMenux logo applied")"
|
msg_ok "$(translate "ProxMenux logo applied")"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user