feat: configure epics env in deployments

This commit is contained in:
Benjamin Labrecque
2026-08-27 14:01:50 +02:00
parent cae8d5767a
commit e956ecc554
2 changed files with 21 additions and 0 deletions
+20
View File
@@ -44,3 +44,23 @@ init_service_env() {
# Host running shellbox, i.e. the host the ioc itself runs on
IOC_HOST=sls-vserv-bd-01${AGEBD_ENV_SUFFIX_LOWER}
}
# Sets up EPICS_CA_ADDR_LIST so caget/caput/etc. can actually reach IOCs from
# this non-interactive shell (the gitea runner, like a systemd --user unit,
# doesn't inherit an interactive login shell's environment).
#
# cas_12_epics.sh can only fall back to the CA gateway when its broadcast-address
# auto-detection fails (e.g. non-accelerator-network hosts) if PSI_GFA_FACILITY is
# set, so we need to set that explicitly.
#
# Usage: setup_epics_env <dev|prod>
setup_epics_env() {
local ENV=$1
export PSI_GFA_FACILITY=SLS
. /etc/profile.d/cas_12_epics.sh
if [ "${ENV}" = "dev" ]; then
export EPICS_CA_ADDR_LIST="$EPICS_CA_ADDR_LIST 129.129.146.255"
fi
}
+1
View File
@@ -5,6 +5,7 @@
source "$(dirname "$0")/common.sh"
init_service_env "${1:-}" "${2:-}"
setup_epics_env "${AGEBD_ENV}"
DO_RESTART_SERVICE=$3
NOW=$(date +%Y-%m-%dT%H:%M:%S%Z)