<commit_before>#!/bin/bash

usage()
{
cat << EOF
usage: $0 options

This script starts up the OpenBazaar client and server.

OPTIONS:
  -h    Help information
  -o    Seed Mode
  -i    Server IP
  -p    Server Port
  -l    Log file
  -d    Development mode
  -n    Number of Dev nodes to start up
  -a    Bitmessage API username
  -b    Bitmessage API password
  -c    Bitmessage API port
  -u    Market ID
  -j    Disable upnp
EOF
}

if which python2 2>/dev/null; then
    PYTHON=python2
else
    PYTHON=python
fi

# Default values
SERVER_PORT=12345
LOGDIR=logs
DBDIR=db
DBFILE=ob.db
DEVELOPMENT=0
SEED_URI='seed.openbazaar.org seed2.openbazaar.org'
LOG_FILE=production.log
DISABLE_UPNP=0

# CRITICAL   50
# ERROR      40
# WARNING    30
# INFO       20
# DEBUG      10
# NOTSET      0
LOG_LEVEL=10

NODES=3
BM_USERNAME=brian
BM_PASSWORD=<PASSWORD>
BM_PORT=8442

HTTP_IP=127.0.0.1
HTTP_PORT=8888

# Tor Information
# - If you enable Tor here you will be operating a hidden
#   service behind your Tor proxy (notional)
TOR_ENABLE=0
TOR_CONTROL_PORT=9051
TOR_SERVER_PORT=9050
TOR_COOKIE_AUTHN=1
TOR_HASHED_CONTROL_PASSWORD=
TOR_PROXY_IP=127.0.0.1
TOR_PROXY_PORT=7000

while getopts "hp:l:dn:a:b:c:u:oi:j:k:q:" OPTION
do
     case ${OPTION} in
         h)
             usage
             exit 1
             ;;
         p)
             SERVER_PORT=$OPTARG
             ;;
         l)
             LOG_FILE=$OPTARG
             ;;
         d)
             DEVELOPMENT=1
             ;;
         n)
             NODES=$OPTARG
             ;;
         a)<commit_msg>fix run.sh disable-upnp option erroneously requiring an argument<commit_after>#!/bin/bash

usage()
{
cat << EOF
usage: $0 options

This script starts up the OpenBazaar client and server.

OPTIONS:
  -h    Help information
  -o    Seed Mode
  -i    Server IP
  -p    Server Port
  -l    Log file
  -d    Development mode
  -n    Number of Dev nodes to start up
  -a    Bitmessage API username
  -b    Bitmessage API password
  -c    Bitmessage API port
  -u    Market ID
  -j    Disable upnp
EOF
}

if which python2 2>/dev/null; then
    PYTHON=python2
else
    PYTHON=python
fi

# Default values
SERVER_PORT=12345
LOGDIR=logs
DBDIR=db
DBFILE=ob.db
DEVELOPMENT=0
SEED_URI='seed.openbazaar.org seed2.openbazaar.org'
LOG_FILE=production.log
DISABLE_UPNP=0

# CRITICAL   50
# ERROR      40
# WARNING    30
# INFO       20
# DEBUG      10
# NOTSET      0
LOG_LEVEL=10

NODES=3
BM_USERNAME=brian
BM_PASSWORD=<PASSWORD>
BM_PORT=8442

HTTP_IP=127.0.0.1
HTTP_PORT=8888

# Tor Information
# - If you enable Tor here you will be operating a hidden
#   service behind your Tor proxy (notional)
TOR_ENABLE=0
TOR_CONTROL_PORT=9051
TOR_SERVER_PORT=9050
TOR_COOKIE_AUTHN=1
TOR_HASHED_CONTROL_PASSWORD=
TOR_PROXY_IP=127.0.0.1
TOR_PROXY_PORT=7000

while getopts "hp:l:dn:a:b:c:u:oi:jk:q:" OPTION
do
     case ${OPTION} in
         h)
             usage
             exit 1
             ;;
         p)
             SERVER_PORT=$OPTARG
             ;;
         l)
             LOG_FILE=$OPTARG
             ;;
         d)
             DEVELOPMENT=1
             ;;
         n)
             NODES=$OPTARG
             ;;
         a)
{'fraction_non_alphanumeric': 0.07912988650693568, 'fraction_numerical': 0.03909205548549811, 'mean_word_length': 2.1168958742632613, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4676473', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1159, 'n_words': 302}