cryptonas/bin/run_webserver.sh
lars ad3de60dd1 added "missing dependency" warnings to network, data, encrypted_webinterface and partition plugins
add "self.root_action" to the plugin specification
implement non-interactive key certificate creation during startup if necessary (the produced certificate is still broken)
run stunnel during startup
returned environment warnings are expected to be lists
2007-01-24 02:51:17 +00:00

37 lines
1 KiB
Bash
Executable file

#!/bin/sh
#
# example start script to run a local cryptobox webserver
#
# we set some parameters to make it possible to run it without an
# existing cryptobox installation
#
# change your local settings in "cryptobox-local.conf" - if this file
# does not exist, then "cryptobox.conf" is used
#
BIN_DIR=$(dirname "$0")
BIN_DIR=$(cd "$BIN_DIR"; pwd)
## add the local python directory to the search path
export PYTHONPATH="$BIN_DIR/../src"
## disable ssl detection
#export HTTPS=1
PREFERRED_CONF_FILE=$BIN_DIR/cryptobox-local.conf
FALLBACK_CONF_FILE=$BIN_DIR/cryptobox.conf
## determine the configuration file
CONFIG_FILE=$FALLBACK_CONF_FILE
test -r "$PREFERRED_CONF_FILE" && CONFIG_FILE=$PREFERRED_CONF_FILE
echo "used config: $CONFIG_FILE"
## 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="$CONFIG_FILE" --pidfile=/tmp/cryptoboxwebserver.pid --logfile=/tmp/cryptoboxwebserver.log --port=8080 --datadir="$BIN_DIR/../www-data" "$@"