From 4a834d748fbe3fe91aca44a195a2a203adf00316 Mon Sep 17 00:00:00 2001 From: IDK Date: Wed, 18 Aug 2021 18:46:54 +0200 Subject: [PATCH] exporte config poursuites etudes --- config/save_scodoc7_data.sh | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/config/save_scodoc7_data.sh b/config/save_scodoc7_data.sh index eac6ebe1..e1681fbe 100755 --- a/config/save_scodoc7_data.sh +++ b/config/save_scodoc7_data.sh @@ -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"