install mode: detect existing install and deflect to --update or --destroy
This commit is contained in:
parent
fc1a98cbfe
commit
fc93201313
1 changed files with 13 additions and 1 deletions
|
|
@ -45,9 +45,21 @@ DOMAIN="${DOMAIN:-nextwks.eu}"
|
||||||
echo "=== NextWorkspace ${MODE} ==="
|
echo "=== NextWorkspace ${MODE} ==="
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# 1. INSTALL MODE — first-time setup
|
# 1. INSTALL MODE — first-time setup (only on bare VM)
|
||||||
# ============================================================
|
# ============================================================
|
||||||
if [ "$MODE" = "install" ]; then
|
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..."
|
echo "[*] Installing system dependencies..."
|
||||||
maybe_sudo apt-get update -qq
|
maybe_sudo apt-get update -qq
|
||||||
maybe_sudo apt-get install -y -qq git build-essential curl podman podman-compose iptables-persistent
|
maybe_sudo apt-get install -y -qq git build-essential curl podman podman-compose iptables-persistent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue