From 506db18260baefceded116bdfc6934eea0284428 Mon Sep 17 00:00:00 2001 From: ChatChimi Date: Sat, 28 Mar 2020 16:18:39 +0100 Subject: script autoBdd --- LICENSE | 0 README.md | 0 analyse/script.sh | 0 automatisation/BDDAuto.sh | 17 +++++++++++++++++ automatisation/txt | 0 web/.htpasswd | 0 web/apache-modified/apache2.conf | 0 web/howto_psql | 0 web/website/.htaccess | 0 web/website/fonctions.py | 0 web/website/index.html | 0 web/website/index.py | 0 web/website/init-bd.sql | 0 web/website/style.css | 0 web/website/test.html | 0 web/website/test.py | 0 16 files changed, 17 insertions(+) mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 analyse/script.sh create mode 100755 automatisation/BDDAuto.sh delete mode 100644 automatisation/txt mode change 100644 => 100755 web/.htpasswd mode change 100644 => 100755 web/apache-modified/apache2.conf mode change 100644 => 100755 web/howto_psql mode change 100644 => 100755 web/website/.htaccess mode change 100644 => 100755 web/website/fonctions.py mode change 100644 => 100755 web/website/index.html mode change 100644 => 100755 web/website/index.py mode change 100644 => 100755 web/website/init-bd.sql mode change 100644 => 100755 web/website/style.css mode change 100644 => 100755 web/website/test.html mode change 100644 => 100755 web/website/test.py diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/analyse/script.sh b/analyse/script.sh old mode 100644 new mode 100755 diff --git a/automatisation/BDDAuto.sh b/automatisation/BDDAuto.sh new file mode 100755 index 0000000..3ec2490 --- /dev/null +++ b/automatisation/BDDAuto.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cp /root/ATS-Project/web/website/init-bd.sql /tmp/table.sql #Car problème de droit root + +apt install postgresql + +useradd atsuser + +echo atsuser:123456 | chpasswd + + +echo "CREATE USER atsuser WITH PASSWORD '123456'; CREATE DATABASE atsdb; GRANT ALL PRIVILEGES ON DATABASE atsdb to atsuser;" > /tmp/conf + + +su - postgres -c "psql -f /tmp/conf" + +su - atsuser -c "psql -d atsdb -U atsuser -f /tmp/table.sql" diff --git a/automatisation/txt b/automatisation/txt deleted file mode 100644 index e69de29..0000000 diff --git a/web/.htpasswd b/web/.htpasswd old mode 100644 new mode 100755 diff --git a/web/apache-modified/apache2.conf b/web/apache-modified/apache2.conf old mode 100644 new mode 100755 diff --git a/web/howto_psql b/web/howto_psql old mode 100644 new mode 100755 diff --git a/web/website/.htaccess b/web/website/.htaccess old mode 100644 new mode 100755 diff --git a/web/website/fonctions.py b/web/website/fonctions.py old mode 100644 new mode 100755 diff --git a/web/website/index.html b/web/website/index.html old mode 100644 new mode 100755 diff --git a/web/website/index.py b/web/website/index.py old mode 100644 new mode 100755 diff --git a/web/website/init-bd.sql b/web/website/init-bd.sql old mode 100644 new mode 100755 diff --git a/web/website/style.css b/web/website/style.css old mode 100644 new mode 100755 diff --git a/web/website/test.html b/web/website/test.html old mode 100644 new mode 100755 diff --git a/web/website/test.py b/web/website/test.py old mode 100644 new mode 100755 -- cgit v1.2.3