-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-kv.sh
executable file
·38 lines (35 loc) · 1.58 KB
/
demo-kv.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
#! /bin/bash
# # Linux
# export MYIP=`ip addr show wlan0 | grep -Po 'inet \K[\d.]+'`
# # Mac
# export MYIP=`ipconfig getifaddr en0`
# # no internet
export MYIP=localhost
tmux new-session -s upring -n baseswim -d
tmux send-keys -t upring "export MYIP=$MYIP" C-m
tmux send-keys -t upring "export PATH=`pwd`/node_modules/.bin:$PATH" C-m
tmux send-keys -t upring 'baseswim --host $MYIP --port 7979 -V | pino' C-m
tmux new-window -n upring-3042
tmux send-keys -t upring "export MYIP=$MYIP" C-m
tmux send-keys -t upring "export PATH=`pwd`/node_modules/.bin:$PATH" C-m
tmux send-keys -t upring 'sleep 1' C-m
tmux send-keys -t upring "upring-kv -P 10 -p 3042 $MYIP:7979 -V | pino" C-m
tmux new-window -n upring-3043
tmux send-keys -t upring "export MYIP=$MYIP" C-m
tmux send-keys -t upring "export PATH=`pwd`/node_modules/.bin:$PATH" C-m
tmux send-keys -t upring 'sleep 1' C-m
tmux send-keys -t upring "upring-kv -P 10 -p 3043 $MYIP:7979 -V | pino" C-m
tmux new-window -n upring-3044
tmux send-keys -t upring "export MYIP=$MYIP" C-m
tmux send-keys -t upring "export PATH=`pwd`/node_modules/.bin:$PATH" C-m
tmux send-keys -t upring 'sleep 1' C-m
tmux send-keys -t upring "upring-kv -P 10 -p 3044 $MYIP:7979 -V | pino" C-m
tmux new-window -n upring-control
tmux send-keys -t upring "export MYIP=$MYIP" C-m
tmux send-keys -t upring "export PATH=`pwd`/node_modules/.bin:$PATH" C-m
tmux send-keys -t upring 'sleep 1' C-m
tmux send-keys -t upring "upring-control -P 10 -p 8042 $MYIP:7979 -v | pino" C-m
tmux new-window -n nginx
tmux send-keys -t upring 'nginx -c `pwd`/nginx.conf' C-m
tmux new-window -n curl
tmux attach -t upring