From 314ed4ab7d3e7525b205662e40a1323b38105095 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 22 Apr 2021 22:14:25 +0200 Subject: [PATCH] Fix scripts --- config/create_dept.sh | 2 +- config/delete_dept.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/create_dept.sh b/config/create_dept.sh index 52775272..e89834f9 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 cec81d01..46c55c01 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"