-
Notifications
You must be signed in to change notification settings - Fork 3
/
startROC.sh
executable file
·57 lines (48 loc) · 1.34 KB
/
startROC.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#
# Shell script to start coda_roc
#
# If no arguments, use coda_conf_functions to get ROC information
#
# Otherwise:
#
# startROC.sh ROCNAME ROCOPTIONS
#
# Where ROCNAME is the name of the ROC component to start
# and ROCOPTIONS (optional) are any other arguments to copy to the coda_roc
# commandline
#
ARGS=$@
if [ -z $HOSTNAME ]; then
HOSTNAME=$(hostname -s)
fi
if [ ${#@} -gt 0 ]; then
# Get the ROC component name
ROCNAME=$1
# Get this ROC's commandline option
shift 1
ROCOPTION=$@
else
. coda_conf_functions
# Get the ROC component name
codaconf_get_component_name $HOSTNAME ROC
ROCNAME=$CODA_COMPONENT_NAME
# Get this ROC's commandline option
codaconf_get_name_option $HOSTNAME $ROCNAME
ROCOPTION=$CODA_COMPONENT_OPTION
fi
ROC_ACTIVE=$(pgrep coda_roc)
if [ -n "$ROC_ACTIVE" ]; then
echo "WARNING: coda_roc already running"
echo " killing them"
killall -v coda_roc
fi
echo "************************************************************"
echo "Starting ROC on" $HOSTNAME
echo " SESSION =" $SESSION
echo " EXPID =" $EXPID
echo " ROC name =" $ROCNAME
echo " ROC option =" $ROCOPTION
echo " Commandline =" $ARGS
echo "************************************************************"
coda_roc -i -v -name $ROCNAME -session $SESSION $ROCOPTION