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

@@ -23,6 +23,42 @@ printf "\n${WHITE}════════════════════
printf " ${BOLD}WebsiteBox Setup Wizard${RESET}\n"
printf "${WHITE}═══════════════════════════════════════════════════════════${RESET}\n\n"
# --- License Key Check ---
if [ -f ".license-key" ]; then
LICENSE_KEY=$(cat .license-key)
if ! echo "$LICENSE_KEY" | grep -qE '^WBOX-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$'; then
printf "${RED} ✗ Invalid license key in .license-key file.${RESET}\n"
printf "${RED} Re-run install.sh or contact support@makeyourown.website${RESET}\n"
exit 1
fi
else
printf "${YELLOW} ⚠ No license key found.${RESET}\n"
printf " Enter your WebsiteBox license key: "
read -r LICENSE_KEY
if ! echo "$LICENSE_KEY" | grep -qE '^WBOX-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$'; then
printf "${RED} ✗ Invalid key format. Expected: WBOX-XXXX-XXXX-XXXX-XXXX${RESET}\n"
exit 1
fi
# Validate with server (burns the key)
printf " Verifying license key...\n"
VALIDATION_RESPONSE=$(curl -sf -X POST https://makeyourown.website/api/validate \
-d "key=${LICENSE_KEY}" 2>/dev/null) || {
printf "${RED} ✗ Could not reach the license server. Try again later.${RESET}\n"
exit 1
}
if echo "$VALIDATION_RESPONSE" | grep -q '"valid": true'; then
printf "${GREEN} ✓ License key verified and activated.${RESET}\n"
echo "$LICENSE_KEY" > .license-key
chmod 600 .license-key
else
printf "${RED} ✗ Invalid or already-used license key.${RESET}\n"
printf "${RED} Purchase WebsiteBox at https://makeyourown.website${RESET}\n"
exit 1
fi
fi
echo ""
# --- Prerequisite Checks ---
check_command() {