mirror of https://github.com/tteck/Proxmox.git
Compare commits
5 Commits
e45aa5e42a
...
5d40a203e6
Author | SHA1 | Date |
---|---|---|
|
5d40a203e6 | |
|
7b7619aaa7 | |
|
6b2df5dd0f | |
|
6c57809037 | |
|
ec6ff20ca2 |
|
@ -59,14 +59,14 @@ header_info
|
|||
echo "Loading..."
|
||||
pveam update >/dev/null 2>&1
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68 || exit
|
||||
CTID_MENU=()
|
||||
TEMPLATE_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
CTID_MENU+=("$ITEM" "$TAG " "OFF")
|
||||
TEMPLATE_MENU+=("$ITEM" "$TAG " "OFF")
|
||||
done < <(pveam available)
|
||||
TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${TEMPLATE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
[ -z "$TEMPLATE" ] && {
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68
|
||||
msg "Done"
|
||||
|
|
|
@ -25,13 +25,15 @@ header_info
|
|||
echo "Loading..."
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed?" 10 58 || exit
|
||||
NODE=$(hostname)
|
||||
EXCLUDE_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(pct list | awk 'NR>1')
|
||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
|
||||
16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
|
||||
function clean_container() {
|
||||
container=$1
|
||||
|
|
|
@ -46,16 +46,16 @@ intel() {
|
|||
intel_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode//" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//')
|
||||
[ -z "$intel_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; }
|
||||
|
||||
CTID_MENU=()
|
||||
MICROCODE_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
(( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
MICROCODE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(echo "$intel_microcode")
|
||||
|
||||
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
|
||||
[ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; }
|
||||
|
||||
|
@ -78,16 +78,16 @@ amd() {
|
|||
|
||||
[ -z "$amd_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; }
|
||||
|
||||
CTID_MENU=()
|
||||
MICROCODE_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
(( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
MICROCODE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(echo "$amd_microcode")
|
||||
|
||||
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
|
||||
[ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; }
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@ header_info
|
|||
echo "Loading..."
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit
|
||||
NODE=$(hostname)
|
||||
CTID_MENU=()
|
||||
EXCLUDE_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(pct list | awk 'NR>1')
|
||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
function update_container() {
|
||||
container=$1
|
||||
header_info
|
||||
|
|
|
@ -57,12 +57,12 @@ if systemctl is-active -q ping-instances.service; then
|
|||
fi
|
||||
header_info
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno "This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68 || exit
|
||||
CTID_MENU=()
|
||||
TURNKEY_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(
|
||||
cat <<EOF
|
||||
ansible Ansible
|
||||
|
@ -87,7 +87,7 @@ wordpress Wordpress
|
|||
zoneminder ZoneMinder
|
||||
EOF
|
||||
)
|
||||
turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist "\nSelect a TurnKey LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist "\nSelect a TurnKey LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${TURNKEY_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
[ -z "$turnkey" ] && {
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" --msgbox "It appears that no TurnKey LXC container was selected" 10 68
|
||||
msg "Done"
|
||||
|
|
Loading…
Reference in New Issue