-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_control_app.sh
executable file
·28 lines (26 loc) · 1.55 KB
/
test_control_app.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
#!/bin/bash
CONTINUE=1
send_signal_to_process () {
echo "Terminating from control app script upon user SIGINT"
CONTINUE=
}
trap send_signal_to_process SIGINT
if ! pkill -SIGTERM -f 'test_control_app.py' &>/dev/null; then
if [[ "$@" != *--no-start* ]]; then
./exec_venv.sh ./test_control_app.py 2>&1 | (trap '' SIGINT; tee test_control_app.out)
while [[ -n "$CONTINUE" ]]; do
sleep 2
{
for i in $(seq 1 20); do
echo ""
done
echo "================================================================================================================================================================";
echo "================================================================================================================================================================";
echo "==== Control App Restart =====================================================================================================================================";
echo "================================================================================================================================================================";
echo "================================================================================================================================================================";
./exec_venv.sh ./test_control_app.py 2>&1
} | (trap '' SIGINT; tee test_control_app.out)
done
fi
fi