mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-11 02:09:17 +00:00
Update create_lxc.sh
This commit is contained in:
parent
b72eb02fde
commit
d10c404b60
@ -15,9 +15,7 @@ YW=$(echo "\033[33m")
|
|||||||
YWB=$(echo "\033[93m")
|
YWB=$(echo "\033[93m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
RD=$(echo "\033[01;31m")
|
RD=$(echo "\033[01;31m")
|
||||||
BGN=$(echo "\033[4;92m")
|
|
||||||
GN=$(echo "\033[1;92m")
|
GN=$(echo "\033[1;92m")
|
||||||
DGN=$(echo "\033[32m")
|
|
||||||
|
|
||||||
# Formatting
|
# Formatting
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
@ -66,7 +64,7 @@ function spinner() {
|
|||||||
# This function displays an informational message with a yellow color.
|
# This function displays an informational message with a yellow color.
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne "${TAB}${YW}${msg}"
|
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||||
spinner &
|
spinner &
|
||||||
SPINNER_PID=$!
|
SPINNER_PID=$!
|
||||||
}
|
}
|
||||||
@ -141,11 +139,14 @@ function select_storage() {
|
|||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted."
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "${CROSS}${RD} Menu aborted by user.${CL}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
printf $STORAGE
|
printf "%s" "$STORAGE"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test if required variables are set
|
# Test if required variables are set
|
||||||
[[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable."
|
[[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable."
|
||||||
[[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable."
|
[[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable."
|
||||||
|
Loading…
Reference in New Issue
Block a user