diff --git a/ioc/startioc.py b/ioc/pystartioc.py similarity index 95% rename from ioc/startioc.py rename to ioc/pystartioc.py index fa6d5ca..74c08d9 100755 --- a/ioc/startioc.py +++ b/ioc/pystartioc.py @@ -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() diff --git a/ioc/startioc b/ioc/startioc new file mode 100644 index 0000000..6b8e47a --- /dev/null +++ b/ioc/startioc @@ -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 \ No newline at end of file