forked from OpenBazaar/OpenBazaar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·49 lines (36 loc) · 1.05 KB
/
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
45
46
47
48
49
# Store config file
STOREFILE=ppl/default
STOREFILE2=ppl/s_tec
# Location of log directory
LOGDIR=logs
# Specify a seed URI or you will be put into demo mode
#SEED_URI=tcp://127.0.0.1:12345
SEED_URI=tcp://seed.openbazaar.org:12345
# Market Info
MY_MARKET_IP=127.0.0.1
MY_MARKET_PORT=12345
if which python2 2>/dev/null; then
PYTHON=python2
else
PYTHON=python
fi
if [ ! -d "$LOGDIR" ]; then
mkdir $LOGDIR
fi
touch $LOGDIR/server.log
if [[ -n "$SEED_URI" ]]; then
$PYTHON node/tornadoloop.py $STOREFILE $MY_MARKET_IP $SEED_URI > $LOGDIR//server.log &
else
# Primary Market - No SEED_URI specified
$PYTHON node/tornadoloop.py $STOREFILE $MY_MARKET_IP > $LOGDIR/server.log &
# Demo Peer Market
sleep 2
touch $LOGDIR/demo_peer.log
$PYTHON node/tornadoloop.py $STOREFILE2 127.0.0.2 tcp://127.0.0.1:$MY_MARKET_PORT > $LOGDIR//demo_peer.log &
fi
# TODO: Want to get rid of this (removed temporarily 2014-05-02 sbl)
# Open the browser if -q is not passed:
#if ! [ $1 = -q ]; then
# xdg-open http://localhost:8888
# xdg-open http://localhost:8889
#fi