mirror of https://github.com/tteck/Proxmox.git
Compare commits
2 Commits
1517bec1c3
...
8bc37d93b7
Author | SHA1 | Date |
---|---|---|
|
8bc37d93b7 | |
|
453a934c8f |
|
@ -1,58 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2023 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT
|
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
||||||
|
|
||||||
if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi
|
|
||||||
set -e
|
|
||||||
clear
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "Start the Bluetooth Integration Preparation (y/n)?" yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]*) break ;;
|
|
||||||
[Nn]*) exit ;;
|
|
||||||
*) echo "Please answer yes or no." ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
clear
|
|
||||||
cat <<"EOF"
|
|
||||||
__ __ ___ _ __ __
|
|
||||||
/ / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_
|
|
||||||
/ /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/
|
|
||||||
/ __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_
|
|
||||||
/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/
|
|
||||||
/ __ )/ /_ _____ / /_____ ____ / /_/ /_
|
|
||||||
/ __ / / / / / _ \/ __/ __ \/ __ \/ __/ __ \
|
|
||||||
/ /_/ / / /_/ / __/ /_/ /_/ / /_/ / /_/ / / /
|
|
||||||
/_____/_/\__,_/\___/\__/\____/\____/\__/_/_/_/_
|
|
||||||
/ _/___ / /____ ____ __________ _/ /_(_)___ ____
|
|
||||||
/ // __ \/ __/ _ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \
|
|
||||||
_/ // / / / /_/ __/ /_/ / / / /_/ / /_/ / /_/ / / / /
|
|
||||||
/___/_/_/_/\__/\___/\__, /_/ \__,_/\__/_/\____/_/ /_/
|
|
||||||
/ __ \________/____/ ____ __________ _/ /_(_)___ ____
|
|
||||||
/ /_/ / ___/ _ \/ __ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \
|
|
||||||
/ ____/ / / __/ /_/ / /_/ / / / /_/ / /_/ / /_/ / / / /
|
|
||||||
/_/ /_/ \___/ .___/\__,_/_/ \__,_/\__/_/\____/_/ /_/
|
|
||||||
/_/
|
|
||||||
|
|
||||||
EOF
|
|
||||||
read -r -p "Switch from dbus-daemon to dbus-broker? <y/N> " prompt
|
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
cat <<EOF >>/etc/apt/sources.list
|
|
||||||
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
|
|
||||||
|
|
||||||
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
|
|
||||||
EOF
|
|
||||||
apt-get update &>/dev/null
|
|
||||||
apt-get -t bullseye-backports install -y dbus-broker &>/dev/null
|
|
||||||
systemctl enable dbus-broker.service &>/dev/null
|
|
||||||
fi
|
|
||||||
read -r -p "Install BlueZ? <y/N> " prompt
|
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
apt-get -t bullseye-backports install -y bluez* &>/dev/null
|
|
||||||
fi
|
|
||||||
echo -e "Finished, reboot for changes to take affect"
|
|
|
@ -38,24 +38,29 @@ function msg_ok() {
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit
|
||||||
|
|
||||||
if [ -z "$available_kernels" ]; then
|
if [ -z "$available_kernels" ]; then
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Old Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Old Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68
|
||||||
msg_info "Exiting"
|
echo "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
msg_ok "Done"
|
clear
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
KERNEL_MENU=()
|
||||||
|
MSG_MAX_LENGTH=0
|
||||||
while read -r TAG ITEM; do
|
while read -r TAG ITEM; do
|
||||||
OFFSET=2
|
OFFSET=2
|
||||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
KERNEL_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(echo "$available_kernels")
|
done < <(echo "$available_kernels")
|
||||||
|
|
||||||
remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \
|
remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${KERNEL_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||||
16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
[ -z "$remove_kernels" ] && {
|
||||||
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Kernel Selected" --msgbox "It appears that no Kernel was selected" 10 68
|
||||||
|
echo "Exiting..."
|
||||||
|
sleep 2
|
||||||
|
clear
|
||||||
|
exit
|
||||||
|
}
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') previously selected Kernels?" 10 68 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') previously selected Kernels?" 10 68 || exit
|
||||||
|
|
||||||
msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}"
|
msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}"
|
||||||
|
@ -67,4 +72,4 @@ msg_info "Updating GRUB"
|
||||||
msg_ok "Successfully Updated GRUB"
|
msg_ok "Successfully Updated GRUB"
|
||||||
msg_info "Exiting"
|
msg_info "Exiting"
|
||||||
sleep 2
|
sleep 2
|
||||||
msg_ok "Done"
|
msg_ok "Finished"
|
||||||
|
|
Loading…
Reference in New Issue