ease local testing (again)

This commit is contained in:
lars 2006-11-28 13:51:09 +00:00
parent 0ccd3f1a41
commit edeba13812
2 changed files with 11 additions and 4 deletions

View File

@ -5,11 +5,17 @@
# we set some parameters to make it possible to run it without an existing cryptobox installation
#
BIN_DIR=$(dirname "$0")
BIN_DIR=$(cd "$(dirname $0)"; pwd)
## add the local python directory to the search path
export PYTHONPATH="$BIN_DIR/../src"
## create necessary directories
mkdir -p "$BIN_DIR/../ttt/mnt"
mkdir -p "$BIN_DIR/../ttt/settings"
cd "$BIN_DIR"
## run the webserver
"$BIN_DIR/CryptoBoxWebserver" --config="$BIN_DIR/cryptobox.conf" --pidfile=/tmp/cryptoboxwebserver.pid --logfile=/tmp/cryptoboxwebser.log --port=8080 --datadir="$BIN_DIR/../www-data" "$@"

View File

@ -1,7 +1,8 @@
#!/bin/sh
ROOT_IMG=$(dirname $0)/cryptobox.img
TEST_IMG=test.img
PROJ_DIR=$($(dirname $0)/..; pwd)
ROOT_IMG=$PROJ_DIR/bin/cryptobox.img
TEST_IMG=$PROJ_DIR/bin/test.img
TEST_SIZE=128
MEM_SIZE=128M
@ -26,5 +27,5 @@ if [ ! -e "$TEST_IMG" ]
dd if=/dev/zero of="$TEST_IMG" bs=1M count=$TEST_SIZE
fi
linux ubd0="$ROOT_IMG" ubd1="$TEST_IMG" con=xterm hostfs=../ fakehd eth0=daemon mem=$MEM_SIZE
linux ubd0="$ROOT_IMG" ubd1="$TEST_IMG" con=xterm hostfs=$PROJ_DIR fakehd eth0=daemon mem=$MEM_SIZE