3 # Configure Loggerhead for FusionForge
6 PATH=/usr/share/gforge/bin:/usr/share/fusionforge/bin:$PATH
7 source_path=`forge_get_config source_path`
8 log_path=`forge_get_config log_path`
9 data_path=`forge_get_config data_path`
10 repos_path=$(forge_get_config repos_path scmbzr)
11 web_host=$(forge_get_config web_host)
12 url_prefix=$(forge_get_config url_prefix)
17 if [ `id -u` != 0 ] ; then
18 echo "You must be root to run this, please enter passwd"
22 configfile=~gforge/.bazaar/bazaar.conf
23 cachedir=/var/cache/gforge/loggerhead
28 if [ ! -e $configfile ] ; then
29 mkdir -p $(dirname $configfile)
30 cat > $configfile <<EOF
31 # Directory to serve bzr branches from
32 # Non-bzr directories under this path will also be visible in loggerhead
33 http_root_dir = '$repos_path'
35 # The url prefix for the bzr branches.
36 http_user_prefix = 'http://$web_host/$url_prefix/scm/loggerhead'
38 # Directory to put cache files in
39 http_sql_dir = '/var/cache/gforge/loggerhead'
42 chown gforge $cachedir
47 rm -rf $configfile $cachedir
48 rmdir $(dirname $configfile) || true
52 echo "Usage: $0 {configure|purge}"