Files
tsysstaticsites/scripts/configure-sites.sh
Charles N Wyble 9cbaf668be fix: correct Grav multi-site setup and rename governance to charters
- Fix setup.php to use Grav's native environment-based multi-site
  - Set GRAV_ENVIRONMENT constant instead of overriding streams
  - Return empty array to let Grav handle stream configuration
- Rename governance.turnsys.com to charters.turnsys.com
  - Update setup.php hostname mapping
  - Update configure-sites.sh site title
  - Update etc-hosts-entries.txt
  - Rename mdbook source directory
  - Rename container environment directory
- Update site title from "TSYS Group Governance" to "TSYS Group Charters"

The stream initialization error was caused by setup.php returning
stream configurations that conflicted with Grav's core streams.
Grav's native environment handling properly manages stream prefixes
when GRAV_ENVIRONMENT is set.

Container is now healthy and responding with 302 redirects.

🤖 Generated with [Crush](https://crush.cbhops.com)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-03-02 16:10:37 -05:00

85 lines
2.3 KiB
Bash

#!/bin/bash
# Generate Grav config and pages for all sites
declare -A SITES=(
["charters.turnsys.com"]="TSYS Group Charters"
["plan.afabn.org"]="AFABN Business Plan"
["plan.ap4ap.org"]="AP4AP Business Plan"
["plan.ezeda.org"]="EzEDA Business Plan"
["plan.ezpodstack.org"]="EzPodStack Business Plan"
["plan.hfnoc.net"]="High Flight NOC Business Plan"
["plan.knownelement.com"]="Known Element Business Plan"
["plan.meetmorse.com"]="MeetMorse Business Plan"
["plan.merchantsofhope.org"]="Merchants of Hope Business Plan"
["plan.rackrental.net"]="RackRental Business Plan"
["plan.redwfo.com"]="Redwood Family Office Business Plan"
["plan.rwscp.net"]="RWSCP Business Plan"
["plan.sidedoorgroup.org"]="Side Door Group Business Plan"
["plan.sol-calc.com"]="Sol-Calc Business Plan"
["plan.suborbital-systems.com"]="Suborbital Systems Business Plan"
["plan.teamrental.net"]="TeamRental Business Plan"
["plan.thecampustradingcompany.com"]="Campus Trading Company Business Plan"
["plan.thepeernet.com"]="The Peer Network Business Plan"
["plan.turnsys.com"]="TSYS Business Plan"
["plan.yourdreamnamehere.com"]="Your Dream Name Here Business Plan"
["startinglineproductions.com-bizopprodplan"]="Starting Line Productions Business Plan"
["staticsites.turnsys.com"]="TSYS Static Sites"
)
BASE="/var/www/html/user/env"
for FQDN in "${!SITES[@]}"; do
TITLE="${SITES[$FQDN]}"
SITE_PATH="$BASE/$FQDN"
# Create system.yaml
cat > "$SITE_PATH/config/system.yaml" << EOF
absolute_urls: true
home:
alias: '/home'
pages:
theme: quark
markdown:
extra: true
process:
markdown: true
twig: false
cache:
enabled: true
check:
method: file
driver: auto
prefix: 'g'
EOF
# Create site.yaml
cat > "$SITE_PATH/config/site.yaml" << EOF
title: '$TITLE'
author:
name: 'TSYS Group'
email: 'admin@turnsys.com'
taxonomies: [category, tag]
metadata:
description: '$TITLE'
EOF
# Create home page
mkdir -p "$SITE_PATH/pages/01.home"
cat > "$SITE_PATH/pages/01.home/default.md" << EOF
---
title: '$TITLE'
---
## $TITLE
This site is powered by Grav CMS.
Content migrated from mdbook coming soon...
EOF
echo "Configured: $FQDN"
done
chown -R www-data:www-data "$BASE"
echo "All sites configured."