forked from ScoDoc/ScoDoc
Fix scripts
This commit is contained in:
parent
7bed86f620
commit
314ed4ab7d
@ -9,7 +9,7 @@
|
|||||||
# E. Viennet, Juin 2008
|
# E. Viennet, Juin 2008
|
||||||
#
|
#
|
||||||
|
|
||||||
set -euo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
source config.sh
|
source config.sh
|
||||||
source utils.sh
|
source utils.sh
|
||||||
|
@ -60,7 +60,7 @@ then
|
|||||||
|
|
||||||
# suppression de la base postgres
|
# suppression de la base postgres
|
||||||
db_name=$(sed '/^dbname=*/!d; s///;q' < "$cfg_pathname")
|
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
|
then
|
||||||
echo "Suppression de la base postgres $db_name ..."
|
echo "Suppression de la base postgres $db_name ..."
|
||||||
su -c "dropdb $db_name" "$POSTGRES_SUPERUSER" || terminate "ne peux supprimer base de donnees $db_name"
|
su -c "dropdb $db_name" "$POSTGRES_SUPERUSER" || terminate "ne peux supprimer base de donnees $db_name"
|
||||||
|
Loading…
Reference in New Issue
Block a user