mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +00:00
Update import-disk-image.sh
This commit is contained in:
parent
bdbea2c4dc
commit
2fda3afe9b
@ -41,6 +41,13 @@ initialize_cache
|
||||
# Path where disk images are stored
|
||||
IMAGES_DIR="/var/lib/vz/template/images/"
|
||||
|
||||
# Ensure directory exists
|
||||
if [ ! -d "$IMAGES_DIR" ]; then
|
||||
mkdir -p "$IMAGES_DIR"
|
||||
chmod 755 "$IMAGES_DIR"
|
||||
msg_info "Created missing directory: $IMAGES_DIR"
|
||||
fi
|
||||
|
||||
# Check if there are any images in the directory
|
||||
IMAGES=$(ls -A "$IMAGES_DIR" | grep -E "\.(img|qcow2|vmdk)$")
|
||||
if [ -z "$IMAGES" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user