Skip to content
Snippets Groups Projects
start_putrecorder 1.06 KiB
Newer Older
mooney's avatar
mooney committed
#!/bin/sh

# start, or restart, caputRecorder.py

PREFIX=$1
if [ "" == "${PREFIX}" ] ; then
	PREFIX="xxx:"
fi

EPICS_APP=/home/oxygen/MOONEY/epics/synApps/support/xxx
MACROS_PY_DIR=${EPICS_APP}/xxxApp/op/python
mooney's avatar
mooney committed

output=`perl -s ${EPICS_APP}/release.pl -form=bash ${EPICS_APP}`
eval $output

CAPUTRECORDER_PY=${CAPUTRECORDER}/caputRecorderApp/op/python/caputRecorder.py

arch=`uname -p`
COMMAND="/APSshare/anaconda/${arch}/bin/python ${CAPUTRECORDER_PY} ${PREFIX}"
sh
mooney's avatar
mooney committed
MY_UID=`id -u`
CAPUTRECORDER_PID=`pgrep -f "${COMMAND}" -u $MY_UID`

if [ "" != "${CAPUTRECORDER_PID}" ] ; then
	kill ${CAPUTRECORDER_PID}
fi


cd ${MACROS_PY_DIR}
export PYTHONPATH=${MACROS_PY_DIR}:$PYTHONPATH
mooney's avatar
mooney committed

# start caputRecorder.py
# The first prefix specifies the caputRecorder.db database instance that will
# function as a user interface for caputRecorder.py, and notify it when a
# caput occurrs.
$COMMAND&

# To record caputs to other iocs, add their prefixes to the command line:
# All iocs must be running access security configured to trap writes, and
# must load caputRecorder.db.
#${COMMAND} yyy: zzz:&