diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9e136a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +keys +flags/* diff --git a/create-proxmox-cloudinit-images.sh b/create-proxmox-cloudinit-images.sh index cdb7b4c..ef4cfe9 100755 --- a/create-proxmox-cloudinit-images.sh +++ b/create-proxmox-cloudinit-images.sh @@ -10,7 +10,8 @@ function createImage() { IMAGE_CORES="$6" IMAGE_STORE="$7" IMAGE_TYPE="$8" - + SSH_KEYS_FILE="keys" + stat "${IMAGE_FILE}" if [ "$?" -gt "0" ] then @@ -66,9 +67,9 @@ function createImage() { qm set ${IMAGE_ID} --vga std ;; esac - + qm set ${IMAGE_ID} --ipconfig0 ip=dhcp qm set ${IMAGE_ID} --agent enabled=1 - + qm set ${IMAGE_ID} --sshkeys ${SSH_KEYS_FILE} rm -vf "${IMAGE_FILE}" }