forked from rdkls/gps-tracker-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserve_gps_dev.sh
executable file
·26 lines (20 loc) · 941 Bytes
/
serve_gps_dev.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
#!/bin/bash
SESSION_NAME=gps_serve
tmux has-session -t ${SESSION_NAME} 2>/dev/null
if [ $? != 0 ] ; then
tmux new-session -s ${SESSION_NAME} -d
tmux send-keys -t ${SESSION_NAME} 'cd ~/ws/gps/www' C-m
tmux send-keys -t ${SESSION_NAME} 'python -m SimpleHTTPServer 9898' C-m
tmux split-window -t ${SESSION_NAME}
tmux send-keys -t ${SESSION_NAME} 'cd ~/ws/gps' C-m
tmux send-keys -t ${SESSION_NAME} '. venv/gps/bin/activate' C-m
tmux send-keys -t ${SESSION_NAME} './device_gateway.py' C-m
tmux split-window -t ${SESSION_NAME}
tmux send-keys -t ${SESSION_NAME} 'cd ~/ws/gps' C-m
tmux send-keys -t ${SESSION_NAME} '. venv/gps/bin/activate' C-m
tmux send-keys -t ${SESSION_NAME} './rest_api/rest_api.py' C-m
tmux split-window -t ${SESSION_NAME}
tmux send-keys -t ${SESSION_NAME} 'cd ~/ws/gps/www' C-m
tmux send-keys -t ${SESSION_NAME} 'gulp watch' C-m
fi
tmux attach -t ${SESSION_NAME}