Files
hla_framework_bd/bin/start_service.sh

37 lines
925 B
Bash
Executable File

#!/bin/bash
SVC_NAME=$1
set --
# TODO: remove?
# PSI_FACILITY=SLS
SERVICES_DIR=/sls/bd/hla/${AGEBD_ENV}/services
SVC_NAME_LOWER=${SVC_NAME,,}
SVC_NAME_LOWER_UNDERSCORES="${SVC_NAME_LOWER//-/_}"
SVC_DIR=${SERVICES_DIR}/${SVC_NAME_LOWER}
# gfa_12_epics.sh died on the 16.04.2026 due to required AFS write access
#. /etc/profile.d/gfa_12_epics.sh
#. /sls/bd/exchange/BeamData/user/felix/workarounds/epicsRHEL8.rc # temporary fix
. /etc/profile.d/cas_12_epics.sh
# TODO: only for dev
export EPICS_CA_ADDR_LIST='sls-cagw.psi.ch:5062 129.129.146.88'
# TODO: what do we need from here?
# activate conda environment
# . /opt/gfa/python-3.10/latest/bin/activate
export PIXI_CACHE_DIR="/sls/bd/hla/.cache/pixi"
APP_DIR=${SVC_DIR}/current/app
echo "App dir: ${APP_DIR}"
cd ${APP_DIR}
# TODO: use `exec pixi run python ...` here?
pixi run python -u -B -m agebd_${SVC_NAME_LOWER_UNDERSCORES}.main
# TODO: remove: cicd test 10