source: trunk/TntReader/init-tntbase @ 705

Revision 705, 1.2 KB checked in by vzholudev, 14 months ago (diff)

cinnamon changes

  • Property svn:executable set to *
Line 
1#!/bin/bash
2# this script initializes a new TNTBase instance
3
4if [ $# -lt 5 ]; then
5    echo 'usage: init-tntbase <name> <svn_user> <svn_password> <omdoc_def_ns> <plugin_dir>'
6    exit 1
7fi
8
9tntbase_repos=/var/www/tntbase/repos
10tntbase_base_url=alpha.tntbase.mathweb.org
11tntbase_root=/TNTBase
12tntbase_webapp_root=$tntbase_root/TntReader
13tntbase_svn_passwd=/usr/local/apache2
14
15name=$1
16svn_user=$2
17svn_password=$3
18omdoc_ns=$4
19plugin_dir=$5
20
21xsvnadmin create --fs-type=bdb $tntbase_repos/$name
22htpasswd -b -m $tntbase_svn_passwd/dav_svn.passwd $svn_user $svn_password
23
24#Updating and rebuilding DbXmlAccessor
25cd $tntbase_root/DbXmlAccessLib/
26svn up
27ant deploy.to.tntreader
28cd ..
29
30#Updating TntReader
31svn up $tntbase_root/TntReader
32
33cat > $tntbase_webapp_root/web/WEB-INF/tntbase.conf <<EOF
34repo.location=$tntbase_repos/$name
35repo.url=http://$tntbase_base_url/repos/$name
36repo.user=$svn_user
37repo.password=$svn_password
38omdoc.ns=$omdoc_ns
39log.dir=/var/log/tntbase
40plugin.dir=$plugin_dir
41EOF
42
43cd $tntbase_webapp_root
44ant remove -Dapp.path=/tntbase/$name
45ant install -Dapp.path=/tntbase/$name
46
47chown -R www-data:www-data /var/www/webapps
48chown -R www-data:www-data /var/www/tntbase/repos
49chown -R www-data:www-data /usr/local/apache-tomcat-6.0.18/
Note: See TracBrowser for help on using the repository browser.