diff --git a/bin/run_webserver.sh b/bin/run_webserver.sh index 772bb2a..6e7cd83 100755 --- a/bin/run_webserver.sh +++ b/bin/run_webserver.sh @@ -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" "$@" diff --git a/bin/uml-setup.sh b/bin/uml-setup.sh index eb8c14e..77c150f 100755 --- a/bin/uml-setup.sh +++ b/bin/uml-setup.sh @@ -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