-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
33 lines (29 loc) · 933 Bytes
/
start.sh
File metadata and controls
33 lines (29 loc) · 933 Bytes
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
app_name=API-Service
router_host=$1
router_port=$2
category=$3
router_db=$4
input() {
if [[ $router_host == "" ]];then
router_host=192.168.100.126
fi
if [[ $router_port == "" ]];then
router_port=9014
fi
if [[ $category == "" ]];then
category=meta
fi
if [[ $router_db == "" ]];then
router_db=test
fi
}
router_start() {
source_path="$( cd "$( dirname "$0" )" && pwd -P )"
router_exec="nohup python3 ${source_path}/server.py --host ${router_host} --port ${router_port} --category ${category} --db_type ${router_db} 1> /dev/null 2>&1 &"
echo "Start Command : ${router_exec}"
nohup python3 ${source_path}/server.py --host ${router_host} --port ${router_port} --category ${category} --db_type ${router_db} 1> /dev/null 2>&1 &
}
echo "########## Start Application (${app_name}) ##########"
echo "========== START ${app_name} =========="
input
router_start