cloudron-setup: add container virtualization check

This commit is contained in:
Girish Ramakrishnan
2022-04-26 08:24:36 -07:00
parent 78824b059e
commit 28b0043541

View File

@@ -46,6 +46,12 @@ if [[ "$(uname -m)" != "x86_64" ]]; then
exit 1
fi
cvirt=$(systemd-detect-virt --container)
if [[ "${cvirt}" != "none" ]]; then
echo "Error: Cloudron does not support ${cvirt}, only runs on bare metal or with full hardware virtualization"
exit 1
fi
# do not use is-active in case box service is down and user attempts to re-install
if systemctl cat box.service >/dev/null 2>&1; then
echo "Error: Cloudron is already installed. To reinstall, start afresh"