diff --git a/config/dbis-exchange.production.v1.json b/config/dbis-exchange.production.v1.json index d0e4fe2..d8abe9d 100644 --- a/config/dbis-exchange.production.v1.json +++ b/config/dbis-exchange.production.v1.json @@ -4,7 +4,7 @@ "chainId": 138, "brandName": "DBIS Exchange", "officeId": 24, - "settlementOfficeExternalId": "HOSPITALLERS-ALI-IRAQ-IRAN", + "settlementOfficeExternalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", "chainRegistry": "config/omnl-supported-chains.v1.json", "maxSupportedChains": 128, "routers": { diff --git a/config/dbis-exchange.v1.json b/config/dbis-exchange.v1.json index e9db10e..cb4d89f 100644 --- a/config/dbis-exchange.v1.json +++ b/config/dbis-exchange.v1.json @@ -4,7 +4,7 @@ "chainId": 138, "brandName": "DBIS Exchange", "officeId": 24, - "settlementOfficeExternalId": "HOSPITALLERS-ALI-IRAQ-IRAN", + "settlementOfficeExternalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", "routers": { "enhancedSwapRouterV2": "0xa421706768aeb7fafa2d912c5e10824ef3437ad4", "uniswapV2": "0x3019A7fDc76ba7F64F18d78e66842760037ee638", diff --git a/config/hybx-omnl-cross-chain-lines.json b/config/hybx-omnl-cross-chain-lines.json index 05c6333..96ecaf6 100644 --- a/config/hybx-omnl-cross-chain-lines.json +++ b/config/hybx-omnl-cross-chain-lines.json @@ -489,8 +489,8 @@ { "lineId": "0xaede6a63b3f49d0d18b13267855274e250516a97c84dcf0d31e17f359ceca4ff", "officeId": 24, - "externalId": "HOSPITALLERS-ALI-IRAQ-IRAN", - "entityName": "HOSPITALLERS \u2014 Ali (Iraq / Iran Operations)", + "externalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", + "entityName": "HOSPITALLERS — Zardasht (Iraq / Iran Operations)", "walletId": "HYBX-OFFICE-024", "treasuryWalletMainnet": "0x87dab11386841366682d6c5fd3cd90587552f8cd", "treasuryWalletChain138": "0xc93522ae4ab7482572cc29edd68fbb6d5ec6a585", diff --git a/config/offices/office-24-opening-journal.v1.json b/config/offices/office-24-opening-journal.v1.json index 6204f9a..b42e95e 100644 --- a/config/offices/office-24-opening-journal.v1.json +++ b/config/offices/office-24-opening-journal.v1.json @@ -2,7 +2,7 @@ "$schema": "Office 24 opening M1 allocation from Head Office (Fineract journal)", "version": "1.0.0", "officeId": 24, - "externalId": "HOSPITALLERS-ALI-IRAQ-IRAN", + "externalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", "referenceNumber": "HOSPITALLERS-24-OPENING-M1", "comments": "M1 allocation from Head Office — Dr 1410 Due From HO / Cr 2100 M1 Central Liabilities", "debitGlCode": "1410", diff --git a/config/offices/office-24-settlement.v1.json b/config/offices/office-24-settlement.v1.json index 30cf81d..01d1b18 100644 --- a/config/offices/office-24-settlement.v1.json +++ b/config/offices/office-24-settlement.v1.json @@ -2,8 +2,8 @@ "$schema": "OMNL Office 24 — Ali HOSPITALLERS settlement profile", "version": "1.0.0", "officeId": 24, - "externalId": "HOSPITALLERS-ALI-IRAQ-IRAN", - "name": "HOSPITALLERS Ali Iraq-Iran", + "externalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", + "name": "HOSPITALLERS — Zardasht (Iraq / Iran Operations)", "fineractTenant": "omnl", "tenantUser": "ali_hospitallers_tenant", "adminUser": "ali_hospitallers_admin", diff --git a/config/omnl-banking-portal-host.v1.json b/config/omnl-banking-portal-host.v1.json index 9370d4f..9e31ae7 100644 --- a/config/omnl-banking-portal-host.v1.json +++ b/config/omnl-banking-portal-host.v1.json @@ -1,8 +1,8 @@ { "version": "1.1.0", - "description": "OMNL banking portal — Ali operator topology (verified via pnpm ali:hospitallers:verify-external)", + "description": "OMNL banking portal — Zardasht operator topology (legacy SSH alias dev-bis-ali still works)", "cursorPath": { - "sshAlias": "dev-bis-ali", + "sshAlias": "dev-bis-zardasht", "publicHostname": "ssh-dev.d-bis.org", "devVmLanIp": "192.168.11.59", "user": "dev1", @@ -18,7 +18,7 @@ }, "bankingLxc": { "ctidEnv": "OMNL_PCT_CTID", - "portalRoot": "/srv/ali-portal", + "portalRoot": "/srv/zardasht-portal", "projectSource": "/home/projects/exchange", "appPort": 3000, "fullStackPorts": { @@ -33,9 +33,9 @@ "publicDomains": "config/omnl-production-domains.v1.json" }, "handoff": { - "refreshCommand": "pnpm ali:hospitallers:handoff", - "verifyCommand": "pnpm ali:hospitallers:verify-external", - "onboardingDoc": "docs/04-configuration/ALI_ZARDASHT_REMOTE_OPERATOR_ONBOARDING.md", + "refreshCommand": "pnpm zardasht:hospitallers:handoff", + "verifyCommand": "pnpm zardasht:hospitallers:verify-external", + "onboardingDoc": "docs/04-configuration/ZARDASHT_REMOTE_OPERATOR_ONBOARDING.md", "workflowDoc": "docs/04-configuration/ALI_GITEA_TWO_REPO_WORKFLOW.md", "forgeRegistry": "docs/04-configuration/FORGE_CANONICAL_REGISTRY.md" }, diff --git a/config/omnl-banking-portal-lxcs.v1.json b/config/omnl-banking-portal-lxcs.v1.json index 6bb2965..4a63bed 100644 --- a/config/omnl-banking-portal-lxcs.v1.json +++ b/config/omnl-banking-portal-lxcs.v1.json @@ -3,7 +3,7 @@ "description": "Banking portal LXCs on Proxmox r630-03 (192.168.11.13). NPMplus maps nine public FQDNs to these four stacks.", "pveHost": "192.168.11.13", "pveNode": "r630-03", - "portalRoot": "/srv/ali-portal", + "portalRoot": "/srv/zardasht-portal", "containers": [ { "ctid": 5825, diff --git a/config/omnl-production-domains.v1.json b/config/omnl-production-domains.v1.json index 193e6cc..9dc5de1 100644 --- a/config/omnl-production-domains.v1.json +++ b/config/omnl-production-domains.v1.json @@ -1,6 +1,6 @@ { "version": "1.0.0", - "originHost": "dev-bis-ali", + "originHost": "dev-bis-zardasht", "originIp": "76.53.10.34", "frontendPort": 3002, "domains": [ diff --git a/config/settlement-middleware.production.v1.json b/config/settlement-middleware.production.v1.json index 00edf6c..a1891d8 100644 --- a/config/settlement-middleware.production.v1.json +++ b/config/settlement-middleware.production.v1.json @@ -6,8 +6,8 @@ "enforceSingleOffice": true, "settlementOffice": { "officeId": 24, - "externalId": "HOSPITALLERS-ALI-IRAQ-IRAN", - "name": "HOSPITALLERS Ali Iraq-Iran", + "externalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", + "name": "HOSPITALLERS — Zardasht (Iraq / Iran Operations)", "profilePath": "config/offices/office-24-settlement.v1.json" }, "defaultCurrency": "USD", diff --git a/config/settlement-middleware.v1.json b/config/settlement-middleware.v1.json index 2d7e7d6..cfb3e39 100644 --- a/config/settlement-middleware.v1.json +++ b/config/settlement-middleware.v1.json @@ -6,8 +6,8 @@ "enforceSingleOffice": true, "settlementOffice": { "officeId": 24, - "externalId": "HOSPITALLERS-ALI-IRAQ-IRAN", - "name": "HOSPITALLERS Ali Iraq-Iran", + "externalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", + "name": "HOSPITALLERS — Zardasht (Iraq / Iran Operations)", "profilePath": "config/offices/office-24-settlement.v1.json" }, "defaultCurrency": "USD", diff --git a/deploy/nginx/omnl-lxc-portal.conf b/deploy/nginx/omnl-lxc-portal.conf index c7e8b49..24e0930 100644 --- a/deploy/nginx/omnl-lxc-portal.conf +++ b/deploy/nginx/omnl-lxc-portal.conf @@ -29,7 +29,7 @@ http { listen [::]:3002 default_server; server_name _; - root /srv/ali-portal/frontend-dapp/dist; + root /srv/zardasht-portal/frontend-dapp/dist; index index.html; location /api/v1/ { diff --git a/frontend-dapp/src/features/central-bank/CentralBankDashboard.tsx b/frontend-dapp/src/features/central-bank/CentralBankDashboard.tsx index 143a63d..889210d 100644 --- a/frontend-dapp/src/features/central-bank/CentralBankDashboard.tsx +++ b/frontend-dapp/src/features/central-bank/CentralBankDashboard.tsx @@ -1,147 +1,294 @@ -import { Link } from 'react-router-dom'; -import { useCentralBank } from './useCentralBank'; -import ChainMatrixPanel from './ChainMatrixPanel'; -import FineractLedgerBanner from '../omnl-dashboard/FineractLedgerBanner'; -import DashboardStatCard from '../omnl-dashboard/DashboardStatCard'; -import DashboardSection from '../omnl-dashboard/DashboardSection'; -import QuickPortalLinks from '../omnl-dashboard/QuickPortalLinks'; -import NasaPageHeader from '../omnl-dashboard/NasaPageHeader'; -import NasaIcon from '../../components/icons/NasaIcon'; -import { formatUsd } from '../../utils/formatMoney'; - -export default function CentralBankDashboard() { - const cb = useCentralBank(); - const office = cb.office as { - officeId?: number; - name?: string; - externalId?: string; - settlement?: { moneyLayers?: string[]; glM0?: string; glM1?: string; glM2?: string }; - } | null; - - return ( -
- - OMNL Central Bank - Production - 128 chains - - } - /> - - - - {cb.error && ( -
- -
-

Failed to load dashboard

-

{cb.error}

-
-
- )} - - - -

- - Money supply -

-

Meta-fiat layers from Fineract general ledger · USD

- -
- - - - -
- -
- cb.refresh()} disabled={cb.loading}> - - {cb.loading ? 'Refreshing…' : 'Refresh'} - - } - > -
-
-
Status
-
{(cb.health as { status?: string })?.status ?? '—'}
-
-
-
Office
-
{office?.officeId ?? 24} · {office?.externalId ?? 'HOSPITALLERS-ALI-IRAQ-IRAN'}
-
-
-
M2 tokens registered
-
{cb.tokenCount}
-
-
-
Active chains
-
- {(cb.health as { chainSupport?: { active?: number; total?: number } })?.chainSupport?.active ?? '—'} - {' / '} - {(cb.health as { chainSupport?: { active?: number; total?: number } })?.chainSupport?.total ?? 128} -
-
-
-
- - -
- {(office?.settlement?.moneyLayers ?? ['M0', 'M1', 'M2']).map((layer) => ( - {layer} - ))} -
-
-
M0 reserve
GL {office?.settlement?.glM0 ?? '1050'}
-
M1 liability
GL {office?.settlement?.glM1 ?? '2100'}
-
M2 broad
GL {office?.settlement?.glM2 ?? '2200'}
-
Inter-office (HO)
GL 1410
-
-

- - Office 24 dashboard - - - DBIS Trade - -

-
- - -
    - {((cb.monitor as { swaps?: { status: string; tokenIn: string; createdAt: string }[] })?.swaps ?? []) - .slice(0, 8) - .map((s, i) => ( -
  • - {s.status} - {s.tokenIn?.slice(0, 12)}… - {s.createdAt?.slice(0, 16)} -
  • - ))} - {!((cb.monitor as { swaps?: unknown[] })?.swaps?.length) && ( -
  • No swaps recorded yet
  • - )} -
-
- - -
-
- ); -} +import { Link } from 'react-router-dom'; + +import { useCentralBank } from './useCentralBank'; + +import ChainMatrixPanel from './ChainMatrixPanel'; + +import FineractLedgerBanner from '../omnl-dashboard/FineractLedgerBanner'; + +import DashboardStatCard from '../omnl-dashboard/DashboardStatCard'; + +import DashboardSection from '../omnl-dashboard/DashboardSection'; + +import QuickPortalLinks from '../omnl-dashboard/QuickPortalLinks'; + +import NasaPageHeader from '../omnl-dashboard/NasaPageHeader'; + +import NasaIcon from '../../components/icons/NasaIcon'; + +import { formatUsd } from '../../utils/formatMoney'; + + + +export default function CentralBankDashboard() { + + const cb = useCentralBank(); + + const office = cb.office as { + + officeId?: number; + + name?: string; + + externalId?: string; + + settlement?: { moneyLayers?: string[]; glM0?: string; glM1?: string; glM2?: string }; + + } | null; + + + + return ( + +
+ + + + OMNL Central Bank + + Production + + 128 chains + + + + } + + /> + + + + + + + + {cb.error && ( + +
+ + + +
+ +

Failed to load dashboard

+ +

{cb.error}

+ +
+ +
+ + )} + + + + + + + +

+ + + + Money supply + +

+ +

Meta-fiat layers from Fineract general ledger · USD

+ + + +
+ + + + + + + + + +
+ + + +
+ + cb.refresh()} disabled={cb.loading}> + + + + {cb.loading ? 'Refreshing…' : 'Refresh'} + + + + } + + > + +
+ +
+ +
Status
+ +
{(cb.health as { status?: string })?.status ?? '—'}
+ +
+ +
+ +
Office
+ +
{office?.officeId ?? 24} · {office?.externalId ?? 'HOSPITALLERS-ZARDASHT-IRAQ-IRAN'}
+ +
+ +
+ +
M2 tokens registered
+ +
{cb.tokenCount}
+ +
+ +
+ +
Active chains
+ +
+ + {(cb.health as { chainSupport?: { active?: number; total?: number } })?.chainSupport?.active ?? '—'} + + {' / '} + + {(cb.health as { chainSupport?: { active?: number; total?: number } })?.chainSupport?.total ?? 128} + +
+ +
+ +
+ +
+ + + + + +
+ + {(office?.settlement?.moneyLayers ?? ['M0', 'M1', 'M2']).map((layer) => ( + + {layer} + + ))} + +
+ +
+ +
M0 reserve
GL {office?.settlement?.glM0 ?? '1050'}
+ +
M1 liability
GL {office?.settlement?.glM1 ?? '2100'}
+ +
M2 broad
GL {office?.settlement?.glM2 ?? '2200'}
+ +
Inter-office (HO)
GL 1410
+ +
+ +

+ + + + Office 24 dashboard + + + + + + DBIS Trade + + + +

+ +
+ + + + + +
    + + {((cb.monitor as { swaps?: { status: string; tokenIn: string; createdAt: string }[] })?.swaps ?? []) + + .slice(0, 8) + + .map((s, i) => ( + +
  • + + {s.status} + + {s.tokenIn?.slice(0, 12)}… + + {s.createdAt?.slice(0, 16)} + +
  • + + ))} + + {!((cb.monitor as { swaps?: unknown[] })?.swaps?.length) && ( + +
  • No swaps recorded yet
  • + + )} + +
+ +
+ + + + + +
+ +
+ + ); + +} + diff --git a/frontend-dapp/src/features/office24/Office24Dashboard.tsx b/frontend-dapp/src/features/office24/Office24Dashboard.tsx index b2f294e..80e4fe9 100644 --- a/frontend-dapp/src/features/office24/Office24Dashboard.tsx +++ b/frontend-dapp/src/features/office24/Office24Dashboard.tsx @@ -1,151 +1,302 @@ -import { Link } from 'react-router-dom'; -import { useOffice24 } from './useOffice24'; -import FineractLedgerBanner from '../omnl-dashboard/FineractLedgerBanner'; -import DashboardStatCard from '../omnl-dashboard/DashboardStatCard'; -import DashboardSection from '../omnl-dashboard/DashboardSection'; -import QuickPortalLinks from '../omnl-dashboard/QuickPortalLinks'; -import NasaPageHeader from '../omnl-dashboard/NasaPageHeader'; -import NasaIcon, { StatusIcon } from '../../components/icons/NasaIcon'; -import { formatUsd } from '../../utils/formatMoney'; - -export default function Office24Dashboard() { - const { office, tokens, health, moneySupply, loading, refresh } = useOffice24(); - const profile = office as { - officeId?: number; - externalId?: string; - name?: string; - locked?: boolean; - tenantUser?: string; - settlement?: { defaultCurrency?: string; moneyLayers?: string[] }; - rails?: { swift?: { enabled?: boolean }; hybx?: { enabled?: boolean }; chain138?: { enabled?: boolean } }; - } | null; - - return ( -
-
-
- - Office 24 - {profile?.locked && Single office · locked} - - } - /> -
-
- - Central Bank - - - DBIS Trade - -
-
- - - - - -

- - Office balances -

-

Live Fineract · {profile?.settlement?.defaultCurrency ?? 'USD'}

- -
- - - - -
- -
- refresh()} className="text-xs text-[#00d4ff] hover:underline inline-flex items-center gap-1"> - - {loading ? 'Refreshing…' : 'Refresh'} - - } - > -
-
-
SWIFT
-
- - {profile?.rails?.swift?.enabled ? 'Enabled' : 'Off'} -
-
-
-
HYBX
-
- - {profile?.rails?.hybx?.enabled ? 'Enabled' : 'Off'} -
-
-
-
Chain 138
-
- - {profile?.rails?.chain138?.enabled ? 'Enabled' : 'Off'} -
-
-
-
DBIS Exchange
-
- - {(health as { status?: string })?.status ?? 'ok'} -
-
-
-
Fineract tenant
-
{profile?.tenantUser ?? 'ali_hospitallers_tenant'}
-
-
-
- - -
- - - - - - - - - - - - {tokens.map((t) => ( - - - - - - - - ))} - {!tokens.length && ( - - - - )} - -
SymbolLineSwapConvertTransfer
{t.symbol}{t.omnlLine ?? 'M2'} - -
No M2 tokens loaded
-
-
-
-
- ); -} +import { Link } from 'react-router-dom'; + +import { useOffice24 } from './useOffice24'; + +import FineractLedgerBanner from '../omnl-dashboard/FineractLedgerBanner'; + +import DashboardStatCard from '../omnl-dashboard/DashboardStatCard'; + +import DashboardSection from '../omnl-dashboard/DashboardSection'; + +import QuickPortalLinks from '../omnl-dashboard/QuickPortalLinks'; + +import NasaPageHeader from '../omnl-dashboard/NasaPageHeader'; + +import NasaIcon, { StatusIcon } from '../../components/icons/NasaIcon'; + +import { formatUsd } from '../../utils/formatMoney'; + + + +export default function Office24Dashboard() { + + const { office, tokens, health, moneySupply, loading, refresh } = useOffice24(); + + const profile = office as { + + officeId?: number; + + externalId?: string; + + name?: string; + + locked?: boolean; + + tenantUser?: string; + + settlement?: { defaultCurrency?: string; moneyLayers?: string[] }; + + rails?: { swift?: { enabled?: boolean }; hybx?: { enabled?: boolean }; chain138?: { enabled?: boolean } }; + + } | null; + + + + return ( + +
+ +
+ +
+ + + + Office 24 + + {profile?.locked && Single office · locked} + + + + } + + /> + +
+ +
+ + + + Central Bank + + + + + + DBIS Trade + + + +
+ +
+ + + + + + + + + + + +

+ + + + Office balances + +

+ +

Live Fineract · {profile?.settlement?.defaultCurrency ?? 'USD'}

+ + + +
+ + + + + + + + + +
+ + + +
+ + refresh()} className="text-xs text-[#00d4ff] hover:underline inline-flex items-center gap-1"> + + + + {loading ? 'Refreshing…' : 'Refresh'} + + + + } + + > + +
+ +
+ +
SWIFT
+ +
+ + + + {profile?.rails?.swift?.enabled ? 'Enabled' : 'Off'} + +
+ +
+ +
+ +
HYBX
+ +
+ + + + {profile?.rails?.hybx?.enabled ? 'Enabled' : 'Off'} + +
+ +
+ +
+ +
Chain 138
+ +
+ + + + {profile?.rails?.chain138?.enabled ? 'Enabled' : 'Off'} + +
+ +
+ +
+ +
DBIS Exchange
+ +
+ + + + {(health as { status?: string })?.status ?? 'ok'} + +
+ +
+ +
+ +
Fineract tenant
+ +
{profile?.tenantUser ?? 'ali_hospitallers_tenant'}
+ +
+ +
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + {tokens.map((t) => ( + + + + + + + + + + + + + + + + ))} + + {!tokens.length && ( + + + + + + + + )} + + + +
SymbolLineSwapConvertTransfer
{t.symbol}{t.omnlLine ?? 'M2'} + + + +
No M2 tokens loaded
+ +
+ +
+ +
+ +
+ + ); + +} + diff --git a/scripts/deployment/activate-omnl-production.sh b/scripts/deployment/activate-omnl-production.sh index dd674f1..05c14a1 100644 --- a/scripts/deployment/activate-omnl-production.sh +++ b/scripts/deployment/activate-omnl-production.sh @@ -27,7 +27,7 @@ log "=== 4/5 Push Fineract/API env to each LXC ===" if [[ -f "$ENV_FILE" ]]; then for CTID in 5825 5826 5827 5828; do bash scripts/deployment/push-portal-env-to-lxc.sh "$CTID" || log "WARN: env push failed for CT $CTID" - omnl_pve_ssh "pct exec ${CTID} -- bash ${OMNL_PORTAL_ROOT:-/srv/ali-portal}/scripts/deployment/start-omnl-banking-portal.sh" 2>/dev/null || true + omnl_pve_ssh "pct exec ${CTID} -- bash ${OMNL_PORTAL_ROOT:-/srv/zardasht-portal}/scripts/deployment/start-omnl-banking-portal.sh" 2>/dev/null || true done else log "WARN: no $ENV_FILE — skip LXC Fineract env" diff --git a/scripts/deployment/deploy-omnl-banking-portal-pct.sh b/scripts/deployment/deploy-omnl-banking-portal-pct.sh index d58e86c..99d671d 100755 --- a/scripts/deployment/deploy-omnl-banking-portal-pct.sh +++ b/scripts/deployment/deploy-omnl-banking-portal-pct.sh @@ -8,7 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${SCRIPT_DIR}/lib/omnl-pve-ssh.sh" CTID="${OMNL_PCT_CTID:-5825}" -PORTAL_ROOT="${OMNL_PORTAL_ROOT:-/srv/ali-portal}" +PORTAL_ROOT="${OMNL_PORTAL_ROOT:-/srv/zardasht-portal}" PROJECT_SRC="${OMNL_PROJECT_SRC:-/home/projects/exchange}" STAGE="/tmp/omnl-banking-portal-$(date +%Y%m%d%H%M%S).tar.gz" diff --git a/scripts/deployment/push-portal-env-to-lxc.sh b/scripts/deployment/push-portal-env-to-lxc.sh index 2107b96..b34cb66 100644 --- a/scripts/deployment/push-portal-env-to-lxc.sh +++ b/scripts/deployment/push-portal-env-to-lxc.sh @@ -5,7 +5,7 @@ set -euo pipefail CTID="${1:?CTID required}" REPO_DIR="${OMNL_BANK_ROOT:-$HOME/smom-dbis-138}" ENV_FILE="${OMNL_BANK_ENV:-$REPO_DIR/.env}" -PORTAL_ROOT="${OMNL_PORTAL_ROOT:-/srv/ali-portal}" +PORTAL_ROOT="${OMNL_PORTAL_ROOT:-/srv/zardasht-portal}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck source=lib/omnl-pve-ssh.sh source "${SCRIPT_DIR}/lib/omnl-pve-ssh.sh" diff --git a/scripts/deployment/start-omnl-banking-portal.sh b/scripts/deployment/start-omnl-banking-portal.sh index fcbd37a..8db706f 100644 --- a/scripts/deployment/start-omnl-banking-portal.sh +++ b/scripts/deployment/start-omnl-banking-portal.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# Start OMNL services from /srv/ali-portal inside PCT +# Start OMNL services from /srv/zardasht-portal inside PCT set -euo pipefail -ROOT="${OMNL_PORTAL_ROOT:-/srv/ali-portal}" +ROOT="${OMNL_PORTAL_ROOT:-/srv/zardasht-portal}" LOG_DIR="${OMNL_BANK_LOG_DIR:-/var/log/omnl-bank}" NGINX_TEMPLATE="${ROOT}/deploy/nginx/omnl-lxc-portal.conf" mkdir -p "$LOG_DIR" @@ -48,7 +48,7 @@ fuser -k "${FRONTEND_PORT}/tcp" 2>/dev/null || true sleep 1 if command -v nginx >/dev/null 2>&1 && [ -f "$NGINX_TEMPLATE" ]; then - sed "s|/srv/ali-portal|${ROOT}|g" "$NGINX_TEMPLATE" > "${LOG_DIR}/nginx.conf" + sed "s|/srv/zardasht-portal|${ROOT}|g; s|/srv/ali-portal|${ROOT}|g" "$NGINX_TEMPLATE" > "${LOG_DIR}/nginx.conf" nginx -t -c "${LOG_DIR}/nginx.conf" nohup nginx -c "${LOG_DIR}/nginx.conf" >"${LOG_DIR}/frontend.log" 2>&1 & echo $! >"${LOG_DIR}/frontend.pid"