Changeset 1751

Show
Ignore:
Timestamp:
Fri Oct 21 15:02:55 2005
Author:
tomash
Message:

Changes related to #1472

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/bin/import.sh

    r1736 r1751  
    37 37  
    38 38 reldir=`dirname $0`/..  
    39   phpdir=`cd $reldir/var; pwd`  
      39 phpdir=ls_storageAdmin_phppart_dir  
      40 if [ "$phpdir" == "ls_storageAdmin_phppart_dir" ]  
      41 then  
      42     phpdir=`cd $reldir/var; pwd`  
      43 fi  
    40 44 filelistpathname=.  
    41 45  
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/bin/dumpDbSchema.sh

    r1601 r1751  
    37 37  
    38 38 reldir=`dirname $0`/..  
    39   phpdir=`cd $reldir/var; pwd`  
      39 phpdir=ls_storageAdmin_phppart_dir  
      40 if [ "$phpdir" == "ls_storageAdmin_phppart_dir" ]  
      41 then  
      42     phpdir=`cd $reldir/var; pwd`  
      43 fi  
    40 44 filelistpathname=.  
    41 45  
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/bin/restore.sh

    r1601 r1751  
    37 37  
    38 38 reldir=`dirname $0`/..  
    39   basedir=`cd $reldir/var; pwd`  
    40   phpdir=`cd $reldir/var; pwd`  
      39 phpdir=ls_storageAdmin_phppart_dir  
      40 if [ "$phpdir" == "ls_storageAdmin_phppart_dir" ]  
      41 then  
      42     phpdir=`cd $reldir/var; pwd`  
      43 fi  
    41 44 mkdir -p $reldir/tmp  
    42 45 tmpmaindir=`cd $reldir/tmp; pwd`  
    43 46 dbxml="db.xml"  
    44   #datestr=`date '+%Y%m%d%H%M%S'`  
    45 47 tarfile0="xmls.tar"  
    46   #tarfile="storage$datestr.tar"  
    47 48  
    48 49 #-------------------------------------------------------------------------------  
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/bin/backup.sh

    r1601 r1751  
    37 37  
    38 38 reldir=`dirname $0`/..  
    39   basedir=`cd $reldir/var; pwd`  
    40   phpdir=`cd $reldir/var; pwd`  
      39 phpdir=ls_storageAdmin_phppart_dir  
      40 if [ "$phpdir" == "ls_storageAdmin_phppart_dir" ]  
      41 then  
      42     phpdir=`cd $reldir/var; pwd`  
      43 fi  
    41 44 mkdir -p $reldir/tmp  
    42 45 tmpmaindir=`cd $reldir/tmp; pwd`  
    43 46 dbxml="db.xml"  
    44 47 datestr=`date '+%Y%m%d%H%M%S'`  
    45   tarfile0="xmls.tar"  
    46   tarfile="storage$datestr.tar"  
      48 xmltar="xmls.tar"  
      49 destfile="storage$datestr.tar"  
    47 50  
    48 51 #-------------------------------------------------------------------------------  
     
    95 98 tmpdir=`mktemp -d $tmpmaindir/tmp.XXXXXX`  
    96 99  
    97   echo "Backuping to $destdir/$tarfile :"  
      100 echo "Backuping to $destdir/$destfile :"  
    97 100 echo "Dumping database  ..."  
    98 101 cd $phpdir  
    103 106 storpath=`php -q getStorPath.php`  
    104 107 cd $storpath/..  
    105   find stor -name "*.xml" -print | tar cf $tmpdir/$tarfile0 -T -  
    106   find stor ! -name "*.xml" -a -type f -print | tar cf $tmpdir/$tarfile -T -  
      108 find stor -name "*.xml" -print | tar cf $tmpdir/$xmltar -T -  
      109 find stor ! -name "*.xml" -a -type f -print | tar cf $tmpdir/$destfile -T -  
    107 110 cd $tmpdir  
    108   tar rf $tarfile0 $dbxml --remove-files  
      111 tar rf $xmltar $dbxml --remove-files  
    108 111 echo "Compressing XML part ..."  
    109   bzip2 $tarfile0  
    110   tar rf $tarfile $tarfile0.bz2 --remove-files  
    111   mv $tarfile "$destdir"  
      112 bzip2 $xmltar  
      113 tar rf $destfile $xmltar.bz2 --remove-files  
      114 mv $destfile "$destdir"  
    112 115 rmdir $tmpdir  
    113 116  
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/var/conf.php.template

    r1614 r1751  
    29 29 ------------------------------------------------------------------------------*/  
    30 30  
    31   $storageServerPath = 'ls_var_dir/LiveSupport/storageServer';  
      31 $storageServerPath = 'ls_storageServer';  
    31 31 ?>  
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/etc/Makefile.in

    r1617 r1751  
    58 58 DOXYGEN_DIR = ${DOC_DIR}/doxygen  
    59 59 ETC_DIR     = ${BASE_DIR}/etc  
      60 DOXYGEN_CONFIG  = ${ETC_DIR}/doxygen.config  
    60 61 INCLUDE_DIR = ${BASE_DIR}/include  
    61 62 LIB_DIR     = ${BASE_DIR}/lib  
     
    68 69  
    69 70 USR_DIR         = ${prefix}  
    70   USR_INCLUDE_DIR = ${USR_DIR}/include  
    71   USR_VAR_DIR     = ${USR_DIR}/var  
    72    
    73   DOXYGEN_CONFIG  = ${ETC_DIR}/doxygen.config  
    74 71  
    75   PHP_DIR         = ${VAR_DIR}  
    76   #TEST_RUNNER     = ${PHP_DIR}/tests/index.php  
      72 DEST_DIR    = ${USR_DIR}/usr  
      73 PHPPART_DIR = @PHPPART_DIR@  
      74 STORAGE_SERVER  = @STORAGE_SERVER@  
    77 75  
    78   #DEST_DIR   = ${USR_VAR_DIR}/LiveSupport/storageAdmin/var  
    79   DEST_DIR   = ${USR_DIR}/usr  
      76 PHPPART_DIR_S=$(shell ${ECHO} ${PHPPART_DIR} | ${SED} -e "s/\//\\\\\\\\\//g")  
      77 STORAGE_SERVER_S=$(shell ${ECHO} ${STORAGE_SERVER} | ${SED} -e "s/\//\\\\\\\\\//g")  
    80 78  
    81   USR_VAR_DIR_S=$(shell ${ECHO} ${USR_VAR_DIR} | ${SED} -e "s/\//\\\\\\\\\//g")  
    82    
    83   REPLACE_SED_STRING="s/ls_var_dir/${USR_VAR_DIR_S}/;"  
      79 SED_STORAGE_SERVER="s/ls_storageServer/${STORAGE_SERVER_S}/;"  
      80 SED_PHPPART_DIR="s/phpdir=ls_storageAdmin_phppart_dir/phpdir=${PHPPART_DIR_S}/;"  
    84 81  
    85 82  
     
    87 84 #   Configuration parameters  
    88 85 #-------------------------------------------------------------------------------  
    89   #CPPFLAGS = @CPPFLAGS@  
    90   #CXXFLAGS = @CXXFLAGS@ @DEFS@ -I${USR_INCLUDE_DIR} -I${INCLUDE_DIR} -I${TMP_DIR}\  
    91   #                             -pedantic -Wall  
    92   #LDFLAGS  = @LDFLAGS@ -L${USR_LIB_DIR} -L${LIB_DIR}  
    93    
    94 86  
    95 87 #-------------------------------------------------------------------------------  
     
    127 119 #   ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te*  
    128 120  
    129   #check: all ${TEST_RUNNER}  
    130   #   ${TEST_RUNNER}  
    131 121 check: all  
    132 122  
    135 125     ${CP} ${BIN_DIR}/*.sh ${DEST_DIR}/bin  
    136 126     ${RM} ${DEST_DIR}/bin/autogen.sh  
    137       ${MKDIR} ${DEST_DIR}/var  
    138       ${CP} ${VAR_DIR}/*.php ${DEST_DIR}/var  
    139       ${CAT} ${VAR_DIR}/conf.php.template | ${SED} -e ${REPLACE_SED_STRING} \  
    140              > ${DEST_DIR}/var/conf.php  
      127     ${CAT} ${BIN_DIR}/import.sh | ${SED} -e ${SED_PHPPART_DIR} \  
      128            > ${DEST_DIR}/bin/import.sh  
      129     ${CAT} ${BIN_DIR}/backup.sh | ${SED} -e ${SED_PHPPART_DIR} \  
      130            > ${DEST_DIR}/bin/backup.sh  
      131     ${CAT} ${BIN_DIR}/restore.sh | ${SED} -e ${SED_PHPPART_DIR} \  
      132            > ${DEST_DIR}/bin/restore.sh  
      133     ${CAT} ${BIN_DIR}/dumpDbSchema.sh | ${SED} -e ${SED_PHPPART_DIR} \  
      134            > ${DEST_DIR}/bin/dumpDbSchema.sh  
      135     ${MKDIR} ${PHPPART_DIR}  
      136     ${CP} ${VAR_DIR}/*.php ${PHPPART_DIR}  
      137     ${CAT} ${VAR_DIR}/conf.php.template | ${SED} -e ${SED_STORAGE_SERVER} \  
      138            > ${PHPPART_DIR}/conf.php  
    141 139  
    142 140  
  • branches/livesupport-1.0.x/livesupport/modules/storageAdmin/etc/configure.ac

    r1601 r1751  
    40 40 AC_CONFIG_SRCDIR(../var/getStorPath.php)  
    41 41  
      42 dnl-----------------------------------------------------------------------------  
      43 dnl  specify directory with php parts of scripts  
      44 dnl-----------------------------------------------------------------------------  
      45 AC_SUBST(PHPPART_DIR)  
      46  
      47 AC_ARG_WITH([phppart-dir],  
      48             AC_HELP_STRING([--with-phppart-dir],  
      49                    [directory with php parts of scripts]),  
      50             [PHPPART_DIR=${withval}], [PHPPART_DIR=/opt/livesupport/modules/storageAdmin/var])  
      51  
      52 AC_MSG_RESULT([directory with php parts of scripts: ${PHPPART_DIR}])  
      53  
      54 dnl-----------------------------------------------------------------------------  
      55 dnl  specify storageServer directory  
      56 dnl-----------------------------------------------------------------------------  
      57 AC_SUBST(STORAGE_SERVER)  
      58  
      59 AC_ARG_WITH([storage-server],  
      60             AC_HELP_STRING([--with-storage-server],  
      61                           [use storageServer in given directory]),  
      62             [STORAGE_SERVER=${withval}], [STORAGE_SERVER=/opt/livesupport/modules/storageServer])  
      63  
      64 AC_MSG_RESULT([using storageServer at: ${STORAGE_SERVER}])  
      65  
      66 dnl-----------------------------------------------------------------------------  
      67 dnl  msg notice  
      68 dnl-----------------------------------------------------------------------------  
      69 AC_MSG_NOTICE(  
      70 [using the following configuration settings:  
      71  
      72     storageServer directory:           ${STORAGE_SERVER}  
      73     php parts directory:               ${PHPPART_DIR}  
      74  
      75 ])  
      76  
    42 77  
    43 78 AC_CONFIG_FILES(../Makefile:../etc/Makefile.in)  
  • branches/livesupport-1.0.x/livesupport/etc/Makefile.in

    r1620 r1751  
    313 313                                          --with-www-docroot=${WWW_DOCROOT} \  
    314 314                                  --with-configure-apache=${CONFIGURE_APACHE}  
    315       cd ${STORAGE_ADMIN_DIR} && ./configure --prefix=${prefix}  
      315     cd ${STORAGE_ADMIN_DIR} && ./configure --prefix=${prefix} \  
      316                     --with-storage-server=${prefix}/var/LiveSupport/storageServer \  
      317                     --with-phppart-dir=${prefix}/usr/var  
    316 318     cd ${STORAGE_SERVER_DIR} && \  
    317 319         ./configure --prefix=${prefix} \