source: MondoRescue/branches/stable/tools/livwww@ 374

Last change on this file since 374 was 374, checked in by bcornec, 18 years ago

www1 delivery

  • Property svn:executable set to *
File size: 864 bytes
Line 
1#!/bin/bash
2#
3# $Id$
4#
5# Delivery of the Web site in a DocumentRoot
6#
7#
8# Please replace with your destination
9#
10DESTDIR=/var/www/html/mondo
11DESTMACH=www1.mondorescue.org
12DESTUSER=apache
13MONDODIR=/mondo/www/html/mondo
14
15
16dname=`dirname $0`
17prem=`echo $dname |cut -c1`
18if [ ${prem} == "/" ]; then
19 export TOOLHOME=$dname
20else
21 export TOOLHOME=${PWD}/$dname
22fi
23
24. $TOOLHOME/common-env
25
26rm -rf $DESTDIR
27cp -a ${BASE}/svn/${VER}/website $DESTDIR
28cp -a ${BASE}/svn/${VER}/documentation/* $DESTDIR/docs
29find $DESTDIR -type d | xargs chmod 755
30find $DESTDIR -type f | xargs chmod 644
31if [ _"$1" == _"" ]; then
32 exit 0
33fi
34cd $DESTDIR
35tar cfj /tmp/mondo-www.tz2 .
36ssh ${DESTUSER}@${DESTMACH} "rm -rf ${MONDODIR} ; mkdir ${MONDODIR}"
37scp /tmp/mondo-www.tz2 ${DESTUSER}@${DESTMACH}:/tmp
38ssh ${DESTUSER}@${DESTMACH} "cd ${MONDODIR} ; tar xfj /tmp/mondo-www.tz2"
Note: See TracBrowser for help on using the repository browser.