forked from OpenBazaar/OpenBazaar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·44 lines (31 loc) · 999 Bytes
/
run.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
# Market Info
MY_MARKET_IP=$(curl -s ifconfig.me)
MY_MARKET_PORT=12345
# Specify a seed URI or you will be put into demo mode
SEED_URI=tcp://seed.openbazaar.org:12345
# Run in local test mode if not production
#MODE=production
MODE=development
# Location of log directory
LOGDIR=logs
if which python2 2>/dev/null; then
PYTHON=python2
else
PYTHON=python
fi
if [ ! -d "$LOGDIR" ]; then
mkdir $LOGDIR
fi
if [ $MODE == production ]; then
# Identity server is coming soon
#$PYTHON ident/identity.py &
$PYTHON node/tornadoloop.py $MY_MARKET_IP -s $SEED_URI -p $MY_MARKET_PORT -l $LOGDIR/node.log -u 1 &
else
# Primary Market - No SEED_URI specified
$PYTHON node/tornadoloop.py 127.0.0.1 -l $LOGDIR/demo_node1.log -u 2 &
# Demo Peer Market
sleep 2
$PYTHON node/tornadoloop.py 127.0.0.2 -s tcp://127.0.0.1:$MY_MARKET_PORT -l $LOGDIR/demo_node1.log -u 3 &
sleep 2
$PYTHON node/tornadoloop.py 127.0.0.3 -s tcp://127.0.0.1:$MY_MARKET_PORT -l $LOGDIR/demo_node1.log -u 4 &
fi