3 # Configure Loggerhead for FusionForge
8 if [ `id -u` != 0 ] ; then
9 echo "You must be root to run this, please enter passwd"
13 configfile=~gforge/.bazaar/bazaar.conf
14 cachedir=/var/cache/gforge/loggerhead
18 PATH=/usr/share/gforge/bin:/usr/share/fusionforge/bin:$PATH
19 repos_path=$(forge_get_config repos_path scmbzr)
20 web_host=$(forge_get_config web_host)
21 url_prefix=$(forge_get_config url_prefix)
24 if [ ! -e $configfile ] ; then
25 mkdir -p $(dirname $configfile)
26 cat > $configfile <<EOF
27 # Directory to serve bzr branches from
28 # Non-bzr directories under this path will also be visible in loggerhead
29 http_root_dir = '${repos_path}'
31 # The url prefix for the bzr branches.
32 http_user_prefix = 'http://${web_host}${url_prefix}scm/loggerhead'
34 # Directory to put cache files in
35 http_sql_dir = '/var/cache/gforge/loggerhead'
38 chown gforge $cachedir
43 rm -rf $configfile $cachedir
44 rmdir $(dirname $configfile) || true
48 echo "Usage: $0 {configure|purge}"