diff --git a/tools/nextwks.sh b/tools/nextwks.sh index 75adc56..cf013b6 100755 --- a/tools/nextwks.sh +++ b/tools/nextwks.sh @@ -45,9 +45,21 @@ DOMAIN="${DOMAIN:-nextwks.eu}" echo "=== NextWorkspace ${MODE} ===" # ============================================================ -# 1. INSTALL MODE — first-time setup +# 1. INSTALL MODE — first-time setup (only on bare VM) # ============================================================ if [ "$MODE" = "install" ]; then + if [ -f "$TARGET_DIR/nextworkspace" ]; then + echo "=================================================================" + echo " NextWorkspace is already installed at $TARGET_DIR" + echo "" + echo " Use --update to rebuild and restart:" + echo " ./nextwks.sh --update" + echo "" + echo " Use --destroy for a full greenfield redeploy:" + echo " ./nextwks.sh --destroy" + echo "=================================================================" + exit 0 + fi echo "[*] Installing system dependencies..." maybe_sudo apt-get update -qq maybe_sudo apt-get install -y -qq git build-essential curl podman podman-compose iptables-persistent