From 66b58f132a3b1960aa1d62c3ae2df19c3e0b09fe Mon Sep 17 00:00:00 2001
From: "jean-marie.place" <jean-marie.place@univ-lille.fr>
Date: Mon, 22 Jan 2024 14:44:36 +0100
Subject: [PATCH] installation depot git

---
 Vagrantfile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Vagrantfile b/Vagrantfile
index c3403ff..0f3aeda 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -74,6 +74,7 @@ Vagrant.configure("2") do |config|
      apt -y install net-tools
      export CONFIG=/vagrant/config
      apt-get install -y gnupg
+     apt-get install -y git
      wget -O - https://scodoc.org/misc/scodoc-repo.gpg.key | gpg --dearmor > /usr/share/keyrings/scodoc-archive-keyring.gpg
      #ajout depot et installation scodoc
      cp $CONFIG/scodoc.list /etc/apt/sources.list.d
@@ -84,7 +85,6 @@ Vagrant.configure("2") do |config|
      apt-get install -y scodoc9
      
      echo '# scodoc user is created by scodoc install. configure it'
-     usermod -aG sudo scodoc
      cp $CONFIG/.bashrc /home/scodoc/.bashrc
      su -c "psql -c 'GRANT postgres TO scodoc;'" postgres
      chpasswd <<EOF
@@ -103,6 +103,14 @@ EOF
      cp $CONFIG/.env /opt/scodoc/.env
      cd /opt/scodoc
      yes | tools/restore_scodoc9_data.sh /$CONFIG/SCODOC.tgz
+
+     # iniitalise repo
+     cd /opt/scodoc
+     su -c "git init" scodoc
+     su -c "git remote add origin https://gitlab.univ-lille.fr/Jean-Marie.Place/scodoc_r6a06.git" scodoc
+     su -c "git fetch" scodoc
+     su -c "git switch master --force" scodoc
+
      echo -n "Adresse ip: " 
      ip a show eth1
   SHELL
-- 
GitLab