Update create_lxc.sh

This commit is contained in:
ArchemedIan 2023-09-03 10:44:01 -04:00
parent 84e5293ebd
commit 6bd2757ee0
1 changed files with 5 additions and 3 deletions

View File

@ -143,9 +143,11 @@ msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
if [ "$arm64ct" = "yes" ]; then if [ "$arm64ct" = "yes" ]; then
msg_info "Downloading And Building LXC Template for Arm64 $PCT_OSTYPE $PCT_OSVERSION" msg_info "Downloading And Building LXC Template for Arm64 $PCT_OSTYPE $PCT_OSVERSION"
sudo pvesm status | grep ctgrabtmp && pvesm remove ctgrabtmp sudo pvesm status | grep ctgrabtmp >/dev/null 2>&1&& pvesm remove ctgrabtmp >/dev/null 2>&1
pvesm add dir ctgrabtmp -content vztmpl -path /tmp/ctgrabtmp pvesm add dir ctgrabtmp -content vztmpl -path /tmp/ctgrabtmp>/dev/null 2>&1
bash <(curl -s https://raw.githubusercontent.com/ArchemedIan/Proxmox-Arm64-Container-Fetcher/main/pimox_image_fetcher.sh) ${PCT_OSTYPE} ${PCT_OSVERSION:-} default /tmp/ctgrabtmp/template/cache 5
echo -e "${PCT_OSTYPE} ${PCT_OSVERSION:-} default /tmp/ctgrabtmp/template/cache 5" |xargs bash <(curl -s https://raw.githubusercontent.com/ArchemedIan/Proxmox-Arm64-Container-Fetcher/main/pimox_image_fetcher.sh)
msg_ok "Downloaded And Built LXC Template for Arm64 $PCT_OSTYPE $PCT_OSVERSION" msg_ok "Downloaded And Built LXC Template for Arm64 $PCT_OSTYPE $PCT_OSVERSION"
TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-}
mapfile -t TEMPLATES < <(ls -l /tmp/ctgrabtmp/template/cache | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) mapfile -t TEMPLATES < <(ls -l /tmp/ctgrabtmp/template/cache | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V)