From e4b95242a017d71fa085a748d0cfcf4e23244a01 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 28 Jul 2021 07:16:06 -0700 Subject: [PATCH] cloudron-setup: check if nginx/docker is already installed (cherry picked from commit ef56bf988812a476d9e1edfb35db9143464dc24f) --- scripts/cloudron-setup | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index 3cca1c626..a821b1ebc 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -99,6 +99,11 @@ if [[ "${ubuntu_version}" != "16.04" && "${ubuntu_version}" != "18.04" && "${ubu exit 1 fi +if which nginx >/dev/null || which docker >/dev/null || which node > /dev/null; then + echo "Error: Some packages like nginx/docker/nodejs are already installed. Cloudron requires specific versions of these packages and will install them as part of it's installation. Please start with a fresh Ubuntu install and run this script again." > /dev/stderr + exit 1 +fi + # Install MOTD file for stack script style installations. this is removed by the trap exit handler. Heredoc quotes prevents parameter expansion cat > /etc/update-motd.d/91-cloudron-install-in-progress <<'EOF' #!/bin/bash