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

Last change on this file since 399 was 399, checked in by bcornec, 18 years ago
  • man pages reviewed
  • pdf, ps, txt and html generated from man pages and published on the Web
  • Bob is in the thanks page for 2nd DNS server
  • Property svn:executable set to *
File size: 1.1 KB
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
11DESTUSER=apache
12MONDODIR=/mondo/www/html/mondo
13TESTDIR=/mondo/www/html/test
14
15/sbin/ifconfig | grep -q 10.3.3 2>&1 > /dev/null
16if [ $? = 0 ]; then
17 DESTMACH=mondo.hpintelco.org
18else
19 DESTMACH=www1.mondorescue.org
20fi
21
22dname=`dirname $0`
23prem=`echo $dname |cut -c1`
24if [ ${prem} == "/" ]; then
25 export TOOLHOME=$dname
26else
27 export TOOLHOME=${PWD}/$dname
28fi
29
30. $TOOLHOME/common-env
31
32rm -rf $DESTDIR
33cp -a ${BASE}/svn/${VER}/website $DESTDIR
34(cd ${BASE}/svn/${VER}/documentation ; make)
35mkdir -p $DESTDIR/docs
36cp -a ${BASE}/svn/${VER}/documentation/* $DESTDIR/docs
37find $DESTDIR -type d | xargs chmod 755
38find $DESTDIR -type f | xargs chmod 644
39cd $DESTDIR
40if [ _"$1" == _"" ]; then
41 exit 0
42else
43 if [ _"$1" == _"test" ]; then
44 DESTDIR=$TESTDIR
45 else
46 DESTDIR=$MONDODIR
47 fi
48fi
49tar cfj /tmp/mondo-www.tz2 .
50ssh ${DESTUSER}@${DESTMACH} "rm -rf ${DESTDIR} ; mkdir ${DESTDIR}"
51scp /tmp/mondo-www.tz2 ${DESTUSER}@${DESTMACH}:/tmp
52rm -f /tmp/mondo-www.tz2
53ssh ${DESTUSER}@${DESTMACH} "cd ${DESTDIR} ; tar xfj /tmp/mondo-www.tz2"
Note: See TracBrowser for help on using the repository browser.