[Scodoc-devel] [SVN] Scolar : [1293] Enhanced data migration script and install script.

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Dim 24 Nov 22:18:20 CET 2013


Une pièce jointe HTML a été nettoyée...
URL: <https://www-rt.iutv.univ-paris13.fr/pipermail/scodoc-devel/attachments/20131124/56a06cce/attachment.html>
-------------- section suivante --------------
Modified: branches/ScoDoc7/config/install_debian7.sh
===================================================================
--- branches/ScoDoc7/config/install_debian7.sh	2013-11-23 13:29:20 UTC (rev 1292)
+++ branches/ScoDoc7/config/install_debian7.sh	2013-11-24 21:18:20 UTC (rev 1293)
@@ -73,6 +73,7 @@
 
 # ------------ AJOUT DES PAQUETS NECESSAIRES
 apt-get update
+apt-get -y dist-upgrade
 apt-get -y install subversion curl cracklib-runtime firehol
 apt-get -y install apache2 ssl-cert 
 apt-get -y install postgresql-9.1 postgresql-client-9.1
@@ -105,6 +106,9 @@
 # UNUSED BY ScoDoc 7:
 # SOFTS="$SCODOC_DIR/config/softs"
 
+# ------------ Upgrade from svn
+(cd "${SCODOC_DIR}"; svn update)
+
 # ------------
 SVNVERSION=$(cd ..; svnversion)
 SVERSION=$(curl --silent http://notes.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=install\&svn=$SVNVERSION)

Modified: branches/ScoDoc7/config/restore_scodoc_data.sh
===================================================================
--- branches/ScoDoc7/config/restore_scodoc_data.sh	2013-11-23 13:29:20 UTC (rev 1292)
+++ branches/ScoDoc7/config/restore_scodoc_data.sh	2013-11-24 21:18:20 UTC (rev 1293)
@@ -41,10 +41,18 @@
   exit 1
 fi
 
-# Source directory
 SRC=$1
-if [ ${SRC##*.} = 'tgz' ]
+
+if [ "${SRC:0:1}" != "/" ]
 then
+  echo "Usage: $0 directory_or_archive"
+  echo "Erreur: utiliser un chemin absolu (commencant par /)"
+  exit 1
+fi
+
+# Source directory
+if [ "${SRC##*.}" = 'tgz' ]
+then
   echo "Opening tgz archive..."
   tmp=$(mktemp -d)
   chmod a+rx "$tmp"
@@ -91,6 +99,13 @@
 rm -rf "$INSTANCE_DIR/log"
 $COPY "$SRC/log" "$INSTANCE_DIR/"
 
+# Fix file ownership and access rights
+chown -R www-data.root "$INSTANCE_DIR/log" 
+chown -R www-data.root "$INSTANCE_DIR/var" 
+chmod 775 "$INSTANCE_DIR./log" "$INSTANCE_DIR./var" 
+chown -R  www-data.root "$SCODOC_DIR"
+chmod -R 775 "$SCODOC_DIR"
+
 # Remove tmp directory
 if [ $IS_TMP = "1" ]
 then


Plus d'informations sur la liste de diffusion Scodoc-devel