Files
hla_framework_bd/.gitea/scripts/ioc-start.sh
labrec_b 16eac5cd08
Build and Publish Site / docker (push) Successful in 4s
Feature/ioc on cicd runner (#71)
Run `ioc ...` from cicd runner, remove ansible and cli commands
Reviewed-on: #71
2026-08-25 14:34:31 +02:00

24 lines
692 B
Bash
Executable File

#!/bin/bash
# Starts the ioc of a service through shellbox on the ioc host.
# Needed once after the initial install of a new ioc.
#
# Usage: ./.gitea/scripts/ioc-start.sh <service-name> <dev|prod>
set -euo pipefail
source "$(dirname "$0")/common.sh"
init_service_env "${1:-}" "${2:-}"
IOC_PORT=$(uv run --directory scripts ci/get_ioc_port.py "${SERVICE_NAME_LOWER}")
echo "=========================================="
echo "Starting ioc: ${IOC_NAME} on ${IOC_HOST}:${IOC_PORT}"
echo "=========================================="
ssh -o BatchMode=yes "${IOC_HOST}" bash -s <<REMOTE
set -e
sudo shellbox status
sudo shellbox reload
sudo shellbox status
sudo shellbox start ${IOC_PORT}
REMOTE