fix entrypoint
This commit is contained in:
@@ -3,6 +3,13 @@ set -euo pipefail
|
|||||||
|
|
||||||
API_SOCKET="/hy.socks"
|
API_SOCKET="/hy.socks"
|
||||||
|
|
||||||
|
_stop() {
|
||||||
|
echo "STOPPING!!"
|
||||||
|
ch-remote --api-socket "$API_SOCKET" power-button
|
||||||
|
}
|
||||||
|
|
||||||
|
trap _stop TERM INT
|
||||||
|
|
||||||
/usr/bin/cloud-hypervisor \
|
/usr/bin/cloud-hypervisor \
|
||||||
--kernel /boot/vmlinuz-virt --initramfs /boot/initramfs-virt \
|
--kernel /boot/vmlinuz-virt --initramfs /boot/initramfs-virt \
|
||||||
--disk path=/image/vm.raw,image_type=raw \
|
--disk path=/image/vm.raw,image_type=raw \
|
||||||
@@ -16,10 +23,4 @@ API_SOCKET="/hy.socks"
|
|||||||
|
|
||||||
CH_PID=$!
|
CH_PID=$!
|
||||||
|
|
||||||
_stop() {
|
|
||||||
ch-remote --api-socket "$API_SOCKET" power-button
|
|
||||||
}
|
|
||||||
|
|
||||||
trap _stop TERM
|
|
||||||
|
|
||||||
wait $CH_PID
|
wait $CH_PID
|
||||||
Reference in New Issue
Block a user