-
Notifications
You must be signed in to change notification settings - Fork 1
/
restart_mpmt_running.sh
executable file
·59 lines (49 loc) · 1.06 KB
/
restart_mpmt_running.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
58
59
#!/bin/bash
source ~/.bashrc
# Stop run
echo "Stopping run"
odbedit -c "stop now"
sleep 5
# Turn off HV
echo "Turning off HV"
source /home/mpmtdaq3/online/mpmt-mainboard/hv_control/hv_off.sh
sleep 60
# Stop frontend
echo "Stop frontend"
odbedit -c "sh febrb01"
sleep 5
# Turn off mainboard
echo "Turn off mainboard"
odbedit -c "set /Equipment/PoeSwitch/Settings/port_enable[0] n"
sleep 20
# Turn on mainboard
echo "Turn on mainboard; wait 6 minutes for it to come up"
odbedit -c "set /Equipment/PoeSwitch/Settings/port_enable[0] y"
sleep 60
echo "wait"
sleep 60
echo "wait"
sleep 60
echo "wait"
sleep 60
echo "wait"
sleep 60
echo "wait"
sleep 60
echo "wait"
# Start frontend
echo "start frontend"
/home/mpmtdaq3/online/mpmt-mainboard/febrb.exe -i 1 -D
sleep 20
# Turn on HV
echo "Turning on HV"
source /home/mpmtdaq3/online/mpmt-mainboard/hv_control/set_hv.sh
sleep 20
source /home/mpmtdaq3/online/mpmt-mainboard/hv_control/hv_off.sh
sleep 20
source /home/mpmtdaq3/online/mpmt-mainboard/hv_control/hv_on.sh
sleep 40
# Start run
echo "Starting run"
odbedit -c "start now"
sleep 5