mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-23 00:33:20 +01:00
Update update-lxcs.sh
This commit is contained in:
parent
5429e11bf5
commit
d0090a8cd0
@ -35,14 +35,7 @@ function update_container() {
|
|||||||
clear
|
clear
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}[Info]${GN} Updating${BL} $container ${CL} \n"
|
echo -e "${BL}[Info]${GN} Updating${BL} $container ${CL} \n"
|
||||||
pct config $container > temp
|
pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y"
|
||||||
os=`awk '/^ostype/' temp | cut -d' ' -f2`
|
|
||||||
if [ "$os" == "alpine" ]
|
|
||||||
then
|
|
||||||
pct exec $container -- ash -c "apk update && apk upgrade"
|
|
||||||
else
|
|
||||||
pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
read -p "Skip stopped containers? " -n 1 -r
|
read -p "Skip stopped containers? " -n 1 -r
|
||||||
echo
|
echo
|
||||||
@ -76,5 +69,4 @@ do
|
|||||||
fi
|
fi
|
||||||
done; wait
|
done; wait
|
||||||
|
|
||||||
rm temp
|
|
||||||
echo -e "${GN} Finished, All Containers Updated. ${CL} \n"
|
echo -e "${GN} Finished, All Containers Updated. ${CL} \n"
|
||||||
|
Loading…
Reference in New Issue
Block a user