Files
ecmc_server_cfg/AutoStart.sh
2024-09-13 09:59:18 +02:00

33 lines
470 B
Bash
Executable File

#!/bin/bash
IAM=$(basename $0)
echo "${IAM}: PWD=$(pwd)"
echo "${IAM}: PATH=$PATH"
case ${IAM} in
AutoStart.sh)
PREFIX="S"
;;
AutoStart-postEPICS.sh)
PREFIX="P"
;;
*)
echo "***** Script name should be AutoStart.sh | AutoStart-postEPICS.sh only"
exit 1
;;
esac
MYAUTOSTARTDIR=AutoStart
if [ -d ${MYAUTOSTARTDIR} ]
then
for f in ${MYAUTOSTARTDIR}/${PREFIX}[0-9][0-9]*
do
if [ -x ${f} ]
then
echo "${IAM}: starting ${f}"
${f}
fi
done
fi