forked from bmoffit/coda_scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrestartStuff
More file actions
executable file
·41 lines (34 loc) · 831 Bytes
/
restartStuff
File metadata and controls
executable file
·41 lines (34 loc) · 831 Bytes
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
#!/bin/bash
#
# restartStuff: kill off the PEB and ROCs.
# They should restart on their own, if they are run with
# the startCoda script
#
# Hardcoded CODA_SCRIPTS and CODA_COMPONENT_TABLE
. ${CODA_SCRIPTS}/coda_conf_functions
TYPES=( "TS" "ROC" "MOLLERADC" "FPGA" "PEB" "SEB" "ER" "DC" )
for type in ${TYPES[@]}
do
coda_conf_get_component_list $type
if [ $? == 1 ] ; then
hosts=${CODA_HOSTNAME_LIST[@]}
case "$type" in
"TS" )
KILLSTRING="coda_ts"
;;
"ROC" | "FPGA" | "MOLLERADC" )
KILLSTRING="coda_roc"
;;
"PEB" | "ER" | "SEB" | "DC" )
KILLSTRING="-f org.jlab.coda.emu.EmuFactory"
;;
esac
# kill the component, if it's still running on the remote host
for host in $hosts
do
echo " Killing $type on $host"
ssh -x -f $host pkill $KILLSTRING
done
fi
done
exit