Skip to content
Snippets Groups Projects
Commit 097f29a9 authored by Erik von Reis's avatar Erik von Reis
Browse files

Merge branch 'awgtp-wrap-mod' into 'master'

support: update wrapper scripts to check SITE/IFO and export TARGET vars

See merge request cds/advligorts!112
parents e57e132d 80e9d3dd
No related branches found
No related tags found
1 merge request!112support: update wrapper scripts to check SITE/IFO and export TARGET vars
......@@ -2,13 +2,16 @@
. /etc/advligorts/env
sys="$1"
if [ -z "$sys" ] ; then
echo "usage: $(basename $0) <sys>"
echo "usage: $(basename $0) <sys>" >&2
exit 1
fi
# add
if [[ $sys == *iop* ]] ; then
rate=${AWG_IOP_RATE:=-4}
if [ -z "$SITE" ] ; then
echo "SITE variable not specified." >&2
exit 2
fi
exec awgtpman \
-s $sys \
$rate
if [ -z "$IFO" ] ; then
echo "IFO variable not specified." >&2
exit 2
fi
export TARGET=${TARGET:=/opt/rtcds/${SITE,,*}/${IFO,,*}}
exec awgtpman -s $sys
......@@ -2,11 +2,19 @@
. /etc/advligorts/env
sys="$1"
if [ -z "$sys" ] ; then
echo "usage: $(basename $0) <sys>"
echo "usage: $(basename $0) <sys>" >&2
exit 1
fi
if [ -z "$SITE" ] ; then
echo "SITE variable not specified." >&2
exit 2
fi
if [ -z "$IFO" ] ; then
echo "IFO variable not specified." >&2
exit 2
fi
export EPICS_DB_INCLUDE_PATH=/usr/lib/epics/dbd
TARGET=/opt/rtcds/${SITE,,*}/${IFO,,*}
export TARGET=/opt/rtcds/${SITE,,*}/${IFO,,*}
ETARGET=${TARGET}/target/${sys}/${sys}epics
cd ${ETARGET}
exec ./${sys}epics ${sys}epics${IFO}.cmd
......@@ -3,9 +3,17 @@
cmd="$1"
sys="$2"
if [ -z "$sys" ] ; then
echo "usage: $(basename $0) start|stop <sys>"
echo "usage: $(basename $0) start|stop <sys>" >&2
exit 1
fi
if [ -z "$SITE" ] ; then
echo "SITE variable not specified." >&2
exit 2
fi
if [ -z "$IFO" ] ; then
echo "IFO variable not specified." >&2
exit 2
fi
TARGET=/opt/rtcds/${SITE,,*}/${IFO,,*}
case $cmd in
start)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment