cloudron-setup: check if box.service exists instead

This commit is contained in:
Girish Ramakrishnan
2021-05-24 19:05:49 -07:00
parent 0a5a24ba2e
commit 2fb6be81fc

View File

@@ -41,7 +41,8 @@ if [[ "${disk_size_gb}" -lt "${MINIMUM_DISK_SIZE_GB}" ]]; then
exit 1
fi
if systemctl -q is-active box; then
# do not use is-active in case box service is down and user attempts to re-install
if systemctl cat box.service 2>/dev/null; then
echo "Error: Cloudron is already installed. To reinstall, start afresh"
exit 1
fi