This commit is contained in:
Emmanuel Viennet 2021-08-19 23:44:11 +02:00
parent bb75fef1f6
commit ccbb021f50

View File

@ -88,11 +88,15 @@ for f in "$SRC"/SCO*.dump
do do
echo "Loading postgres database from $f" echo "Loading postgres database from $f"
pg_restore --create -d SCODOC --no-owner "$f" pg_restore --create -d SCODOC --no-owner "$f"
if [ ! "$?" -eq 0 ] # le pg_restore a parfois des erreurs sans gravités...
then # voir https://www.postgresql.org/message-id/20849.1541638465%40sss.pgh.pa.us
printf "Error restoring postgresql database\nPlease check that SQL server is running\nAborting." # donc on ne peut pas se fier au code de retour.
exit 1 # Demander aux utilisateurs de vérifier eux meêm que les bases sont OK
fi # if [ ! "$?" -eq 0 ]
# then
# printf "Error restoring postgresql database\nPlease check that SQL server is running\nAborting."
# exit 1
# fi
done done
# #