mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "858a00176db77c18d0f6bdf336ffd2d3f77c3719" and "347d8310e4af4214aa9f81ed115c5454891893c4" have entirely different histories.
858a00176d
...
347d8310e4
|
@ -4,13 +4,6 @@
|
|||
|
||||
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||
|
||||
## 2023-09-05
|
||||
|
||||
### Changed
|
||||
|
||||
- **Proxmox VE LXC Updater**
|
||||
- Added a new menu that allows you to choose which containers you want to exclude from the update process.
|
||||
|
||||
## 2023-09-01
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m")
|
|||
CL=$(echo "\033[m")
|
||||
header_info
|
||||
while true; do
|
||||
read -p "This Will Update Selected LXC Containers. Proceed(y/n)?" yn
|
||||
read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
[Nn]*) exit ;;
|
||||
|
@ -34,20 +34,7 @@ while true; do
|
|||
esac
|
||||
done
|
||||
clear
|
||||
TITLE="Containers on node"
|
||||
while read -r line; do
|
||||
TAG=$(echo "$line" | awk '{print $1}')
|
||||
ITEM=$(echo "$line" | awk '{print substr($0,36)}')
|
||||
OFFSET=2
|
||||
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
|
||||
MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
|
||||
fi
|
||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(pct list | awk 'NR>1')
|
||||
excluded_containers=$(whiptail --title "$TITLE" --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=("$@")
|
||||
function update_container() {
|
||||
container=$1
|
||||
header_info
|
||||
|
@ -69,7 +56,14 @@ function update_container() {
|
|||
}
|
||||
header_info
|
||||
for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
|
||||
excluded=false
|
||||
for excluded_container in "${excluded_containers[@]}"; do
|
||||
if [ "$container" == "$excluded_container" ]; then
|
||||
excluded=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$excluded" == true ]; then
|
||||
header_info
|
||||
echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}"
|
||||
sleep 1
|
||||
|
@ -91,4 +85,4 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
|||
done
|
||||
wait
|
||||
header_info
|
||||
echo -e "${GN} Finished, Selected Containers Updated. ${CL} \n"
|
||||
echo -e "${GN} Finished, All Containers Updated. ${CL} \n"
|
||||
|
|
Loading…
Reference in New Issue