forked from KxSystems/kdb-tick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtick.sh
executable file
·55 lines (42 loc) · 872 Bytes
/
tick.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
#!/bin/bash
q=/Users/j/Lib/q/m64/q
dash=/Users/j/Lib/dash
SYM=sym
TP_PORT=5010
RDB_PORT=5011
RTS_PORT=5012
DSH_PORT=10001
start_processes() {
echo "Starting TP..."
$q tick.q $SYM . -p $TP_PORT &
tp_pid=$!
sleep 1
echo "Starting RDB..."
$q tick/r.q :$TP_PORT -p $RDB_PORT &
rdb_pid=$!
sleep 1
echo "Starting FH..."
$q feed.q :$TP_PORT &
fh_pid=$!
sleep 1
echo "Starting DASH..."
cd $dash
$q dash.q -p $DSH_PORT -u 1 &
dsh_pid=$!
sleep 1
cd -
echo "Starting RTS..."
$q tick/rts.q :$TP_PORT -p $RTS_PORT &
rts_pid=$!
trap 'kill_processes' EXIT
}
kill_processes() {
echo "Stopping all components..."
kill $tp_pid $rdb_pid $fh_pid $dsh_pid $rts_pid
echo "Processes stopped."
}
echo "Starting tick system..."
start_processes
while true; do
sleep 1
done