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