3 # start bweb with lighttpd
7 if [ -f $PWD/html/bweb.js ]; then
10 elif [ -f $PWD/../html/bweb.js ]; then
11 BWEBBASE=$(dirname $PWD)
13 elif [ -f $BASE/html/bweb.js ]; then
16 elif [ -f $BASE/../html/bweb.js ]; then
17 BWEBBASE=$(cd $BASE; dirname $(pwd))
20 echo "Can't determine bweb installation directory"
24 if [ ! -f $BWEBBASE/bweb.conf ]; then
25 echo "Making configuration template in $BWEBBASE/bweb.conf"
26 cat > $BWEBBASE/bweb.conf <<EOF
27 \$VAR1 = { template_dir => '$BWEBBASE/lang',
28 bconsole => 'bconsole -n',
29 fv_write_path => '/tmp/',
34 host=$(awk -F'"' '/bind/ { print $2 }' $BWEBBASE/script/httpd.conf)
35 port=$(awk '/port/ { print $3 }' $BWEBBASE/script/httpd.conf)
37 echo "Using bweb on $BWEBBASE, use firefox http://$host:$port"
39 export BWEBCONF=$BWEBBASE/bweb.conf
41 if [ x$1 = x -o x$1 = xstart ]; then
42 lighttpd -f $BWEBBASE/script/httpd.conf
45 echo "Something is wrong with lighttpd, be sure that it is installed"
50 if [ x$1 = xstop ]; then