diff --git a/config/create_dept.sh b/config/create_dept.sh index 52775272f3..e89834f9b3 100755 --- a/config/create_dept.sh +++ b/config/create_dept.sh @@ -9,7 +9,7 @@ # E. Viennet, Juin 2008 # -set -euo pipefail +set -eo pipefail source config.sh source utils.sh diff --git a/config/delete_dept.sh b/config/delete_dept.sh index cec81d01d9..46c55c015c 100755 --- a/config/delete_dept.sh +++ b/config/delete_dept.sh @@ -60,7 +60,7 @@ then # suppression de la base postgres db_name=$(sed '/^dbname=*/!d; s///;q' < "$cfg_pathname") - if su -c "psql -lt" "$POSTGRES_SUPERUSER" | cut -d \| -f 1 | grep -wq SCORT + if su -c "psql -lt" "$POSTGRES_SUPERUSER" | cut -d \| -f 1 | grep -wq "$db_name" then echo "Suppression de la base postgres $db_name ..." su -c "dropdb $db_name" "$POSTGRES_SUPERUSER" || terminate "ne peux supprimer base de donnees $db_name"