Added indirection via startioc so the path is set correctly

This commit is contained in:
2025-07-22 14:16:14 +02:00
parent 33f18ba9f0
commit 94cc456b88
2 changed files with 15 additions and 2 deletions

View File

@@ -37,7 +37,8 @@ def startioc():
f'epicsEnvSet("MASTERMACS1_PORT", "{config["controllers"]["masterMacs1"]["port"]}")\n')
# Start the IOC itself
subprocess.run(root_dir + 'ioc/st.cmd')
subprocess.run(root_dir + 'ioc/startioc')
if __name__ == __main__:
if __name__ == '__main__':
startioc()

12
ioc/startioc Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
export EPICS_BASE=/usr/local/epics/base-7.0.7
export EPICS_HOST_ARCH=RHEL8-x86_64
# Get the full directory path of the script
SCRIPT_DIR=$(dirname "$(realpath "$0")")
# Needed so st.cmd finds other .cmd files
cd "$SCRIPT_DIR" || exit 1
# Run the IOC shell script
st.cmd