forked from ScoDoc/ScoDoc
exporte config poursuites etudes
This commit is contained in:
parent
48d5995a2a
commit
4a834d748f
@ -48,7 +48,7 @@ for cfgfile in "$INSTANCE_DIR"/var/scodoc/config/depts/*cfg USERS
|
||||
do
|
||||
cfgfile=$(basename "$cfgfile")
|
||||
dept="${cfgfile%*.cfg}"
|
||||
db_name="SCO$dept"
|
||||
db_name=$(echo "SCO$dept" | tr "[:lower:]" "[:upper:]")
|
||||
echo "$db_name"
|
||||
su -c "pg_dump --format=custom --file=\"$DEST/$db_name.dump\" \"$db_name\"" postgres
|
||||
if [ ! "$?" -eq 0 ]
|
||||
@ -63,28 +63,13 @@ chown root "$DEST"
|
||||
echo "Copying var/ ..."
|
||||
cp -rp "$INSTANCE_DIR/var" "$DEST"
|
||||
|
||||
# Depts db config (now in .../var)
|
||||
shopt -s nullglob
|
||||
if [ -n "$(echo ${SCODOC_DIR}/config/depts/*.cfg)" ]
|
||||
then
|
||||
echo "Copying legacy depts configs..."
|
||||
cp -rp "$SCODOC_DIR/config/depts" "$DEST"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Photos des etudiants (now in .../var)
|
||||
if [ -e "$SCODOC_DIR/static/photos" ]
|
||||
then
|
||||
echo "Copying legacy photos..."
|
||||
cp -rp "$SCODOC_DIR/static/photos" "$DEST"
|
||||
fi
|
||||
|
||||
echo "Copying logos..."
|
||||
cp -rp "$SCODOC_DIR/logos" "$DEST"
|
||||
|
||||
echo "Copying configuration file..."
|
||||
cp -p "$SCODOC_DIR/config/scodoc_config.py" "$DEST"
|
||||
mkdir "$DEST/config"
|
||||
cp -p "$SCODOC_DIR/config/scodoc_config.py" "$DEST/config/"
|
||||
cp -rp "$SCODOC_DIR/config/doc_poursuites_etudes" "$DEST/config/"
|
||||
|
||||
echo "Copying server logs..."
|
||||
cp -rp "$INSTANCE_DIR/log" "$DEST"
|
||||
|
Loading…
Reference in New Issue
Block a user