Skip to content

Commit

Permalink
Merge pull request #832 from gubatron/launcher-documentation-updates
Browse files Browse the repository at this point in the history
Update launching documentation. Fix debian package (part 1).
  • Loading branch information
Renelvon committed Oct 27, 2014
2 parents 43d47e6 + 5c9156e commit 2453c86
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 61 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ WORKDIR /bazaar

ENV LOG_PATH /bazaar/logs/production.log

# touch log file before bash run.sh to keep tail -f work
# touch log file before bash openbazaar to keep tail -f work
RUN mkdir -p /bazaar/logs && touch $LOG_PATH
CMD IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}') && \
bash run.sh --disable-open-browser -k $IP $RUNSH_ARGS && tail -f $LOG_PATH
bash openbazaar --disable-open-browser -k $IP $RUNSH_ARGS start && tail -f $LOG_PATH

# clean tmp file
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ cd OpenBazaar

After running the configure.sh script you should have an OpenBazaar installation ready to go, to start run:
```
./run.sh
./openbazaar start
```
OpenBazaar will open in a random port on your default web browser. Note that it may take several minutes for OpenBazaar to completely start.

Expand Down
6 changes: 3 additions & 3 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function installMac {
function doneMessage {
echo ""
echo "OpenBazaar configuration finished."
echo "type './run.sh; tail -f logs/production.log' to start your OpenBazaar servent instance and monitor logging output."
echo "type './openbazaar start; tail -f logs/production.log' to start your OpenBazaar servent instance and monitor logging output."
echo ""
echo ""
echo ""
Expand Down Expand Up @@ -172,7 +172,7 @@ function installRaspiArch {
echo "Type the following shell command to start."
echo " "
echo "IP=\$(/sbin/ifconfig eth0 | grep 'inet ' | awk '{print \$2}')"
echo "./run.sh --disable-open-browser -k \$IP -q 8888 -p 12345; tail -f logs/production.log"
echo "./openbazaar --disable-open-browser -k \$IP -q 8888 -p 12345 start; tail -f logs/production.log"
fi
}

Expand All @@ -188,7 +188,7 @@ function installRaspbian {
echo "Type the following shell command to start."
echo " "
echo "IP=\$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print \$1}')"
echo "./run.sh --disable-open-browser -k \$IP -q 8888 -p 12345; tail -f logs/production.log"
echo "./openbazaar --disable-open-browser -k \$IP -q 8888 -p 12345 start; tail -f logs/production.log"
fi
}

Expand Down
4 changes: 2 additions & 2 deletions docs/Using OpenBazaar with Tor.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ There are two methods for getting OpenBazaar working with Tor:

1. Install the Proxychains package
2. Start OpenBazaar with :
` proxychains ./run.sh -j'
` proxychains ./openbazaar -j start'

## 3. ONIONCAT

Expand All @@ -49,5 +49,5 @@ There are two methods for getting OpenBazaar working with Tor:
5. Check that a new TUN interface configured with an IPv6 address has been created.
6. Configure your firewall to drop all inbound traffic on that interface except for port tcp/12345
7. Start OpenBazaar specifying your new IPv6 TUN address as follows :<br/>
` ./run.sh -j -i a:b:c:d:e:f:g:h`
` ./openbazaar -j -i a:b:c:d:e:f:g:h start`

6 changes: 3 additions & 3 deletions installers/ubuntu/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ set -e
echo "[openbazaar] Installing OpenBazaar python dependencies..."

pushd /usr/share/openbazaar
sudo pip install -r requirements.txt
sudo virtualenv env
sudo ./env/bin/pip install -r requirements.txt
popd

sudo chmod -R 775 /usr/share/openbazaar
Expand All @@ -19,8 +20,7 @@ echo
echo
echo
echo "[openbazaar] Installation finished."
echo "[openbazaar] Now type 'openbazaar start' to start OpenBazaar"
echo "[openbazaar] then open it in your favorite web browser"
echo "[openbazaar] Now type 'openbazaar start' to start OpenBazaar."
echo
echo
echo
Expand Down
4 changes: 1 addition & 3 deletions installers/ubuntu/build
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ def copy_files():
assert_current_dir_is('output')

# copy the launcher scripts and icon
os.system('cp ' + OB_PROJECT_DIR + '/run.sh .' + USR_SHARE_OB_DIR)
os.system('cp ' + OB_PROJECT_DIR + '/stop.sh .' + USR_SHARE_OB_DIR)
os.system('cp ' + OB_PROJECT_DIR + '/requirements.txt .' + USR_SHARE_OB_DIR)
os.system('cp ' + OB_PROJECT_DIR + '/configure.sh .' + USR_SHARE_OB_DIR)

Expand All @@ -135,7 +133,7 @@ def copy_files():
os.system('gzip -9 .' + DOC_DIR + '/changelog')

# make sure launcher script is executable
os.system('cp ../openbazaar .' + BIN_DIR)
os.system('cp ' + OB_PROJECT_DIR + '/openbazaar .' + BIN_DIR)
os.system('chmod 0755 .' + BIN_DIR + '/openbazaar')

# copy DEBIAN files
Expand Down
45 changes: 0 additions & 45 deletions installers/ubuntu/openbazaar

This file was deleted.

12 changes: 12 additions & 0 deletions openbazaar
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,16 @@
if [[ $OSTYPE == darwin* ]] ; then
export DYLD_LIBRARY_PATH=$(brew --prefix openssl)/lib:${DYLD_LIBRARY_PATH}
fi

# if being executed from a ubuntu install out of /usr/bin
# we make sure we are standing at openbazaar's folder
# so we can make use of the virtual environment.
if [[ ${BASH_SOURCE[0]} == /usr/bin/openbazaar ]] ; then
pushd /usr/share/openbazaar
fi

./env/bin/python node/openbazaar.py "$@" &

if [[ ${BASH_SOURCE[0]} == /usr/bin/openbazaar ]] ; then
popd
fi
4 changes: 2 additions & 2 deletions util/docker/logelk/ob/ob.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
LOG_PATH=/bazaar/logs/production.log
# touch log file before bash run.sh to keep tail -f work
# touch log file before bash openbazaar start to keep tail -f work
mkdir -p /bazaar/logs && touch $LOG_PATH
IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
cd /bazaar && ./run.sh -j --disable-open-browser -k $IP $RUNSH_ARGS && tail -f $LOG_PATH
cd /bazaar && ./openbazaar -j --disable-open-browser -k $IP $RUNSH_ARGS start && tail -f $LOG_PATH

0 comments on commit 2453c86

Please sign in to comment.