Private
Public Access
1
0

Add license key gate, migrate marketing site to separate repo

- install.sh: prompt for license key as first step, validate against
  makeyourown.website/api/validate before any system changes
- setup.sh: secondary key check (format-only if .license-key exists,
  server validation if missing)
- Remove website/ directory — marketing site, keyserver, and deploy
  scripts migrated to the websites repo (git.constantprojects.xyz/
  tankadmin/websites.git) for independent deployment
- Update CLAUDE.md, guide.md, .gitignore to reflect migration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
constantprojects
2026-02-24 12:50:24 -07:00
parent 1750efeb05
commit 0bef817f7b
19 changed files with 119 additions and 2211 deletions

View File

@@ -52,6 +52,41 @@ show_progress() {
header "WebsiteBox Installer"
# --- License Key ---
section "License Key"
step "Enter your WebsiteBox license key"
info "You received this key in your purchase confirmation email."
info "Format: WBOX-XXXX-XXXX-XXXX-XXXX"
echo ""
printf " License key: "
read -r LICENSE_KEY < /dev/tty
# Validate format
if ! echo "$LICENSE_KEY" | grep -qE '^WBOX-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$'; then
err "Invalid key format. Expected: WBOX-XXXX-XXXX-XXXX-XXXX"
exit 1
fi
# Validate with server (burns the key on success)
step "Verifying license key..."
VALIDATION_RESPONSE=$(curl -sf -X POST https://makeyourown.website/api/validate \
-d "key=${LICENSE_KEY}" 2>/dev/null) || {
err "Could not reach the license server."
err "Check your internet connection and try again."
err "If this persists, contact support@makeyourown.website"
exit 1
}
if echo "$VALIDATION_RESPONSE" | grep -q '"valid": true'; then
ok "License key verified and activated."
else
err "Invalid or already-used license key."
err "Purchase WebsiteBox at https://makeyourown.website"
exit 1
fi
echo ""
# --- Check for root/sudo ---
if [ "$(id -u)" -eq 0 ]; then
@@ -244,6 +279,10 @@ fi
# Make scripts executable
chmod +x setup.sh install.sh scripts/*.sh
# Save license key
echo "${LICENSE_KEY}" > "${INSTALL_DIR}/.license-key"
chmod 600 "${INSTALL_DIR}/.license-key"
# --- Install shell alias ---
# Adds "websitebox" command that auto-cds into the project directory.
# Usage: websitebox up, websitebox logs, websitebox down, etc.