From b1425fdb9b19ea1efd5dc405fe746789a511e58f Mon Sep 17 00:00:00 2001 From: ChatChimi Date: Sat, 28 Mar 2020 16:45:42 +0100 Subject: Update BDDauto.sh --- automatisation/BDDAuto.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'automatisation') diff --git a/automatisation/BDDAuto.sh b/automatisation/BDDAuto.sh index 3ec2490..61ff956 100755 --- a/automatisation/BDDAuto.sh +++ b/automatisation/BDDAuto.sh @@ -1,4 +1,6 @@ #!/bin/bash +#cloner dans le repertoire personnel du root +#exucuter en tant que root cp /root/ATS-Project/web/website/init-bd.sql /tmp/table.sql #Car problème de droit root @@ -14,4 +16,6 @@ echo "CREATE USER atsuser WITH PASSWORD '123456'; CREATE DATABASE atsdb; GRANT A su - postgres -c "psql -f /tmp/conf" -su - atsuser -c "psql -d atsdb -U atsuser -f /tmp/table.sql" + +pushd /tmp ; su atsuser -c "psql -d atsdb -U atsuser -f /tmp/table.sql" ; popd + -- cgit v1.2.3