From 4428bc0da10a4cd8d4b0af2e3163c5055d9f689d Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Mon, 21 Jan 2019 10:59:19 +0100
Subject: [PATCH] Reintrant postinstall

---
 postinstall_partage.sh | 10 ++++++++--
 postinstall_reseau.sh  |  9 ++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/postinstall_partage.sh b/postinstall_partage.sh
index 2134d01..b93ff0a 100755
--- a/postinstall_partage.sh
+++ b/postinstall_partage.sh
@@ -26,8 +26,14 @@ apt-eole install \
     printer-driver-splix \
     hplip \
     wakeonlan
-git clone https://gitlab.tetras-libre.fr/tetras-libre/eole-wol
-cd eole-wol
+if [ ! -e "eole-wol" ]
+then
+    git clone https://gitlab.tetras-libre.fr/tetras-libre/eole-wol
+    cd eole-wol
+else
+    cd eole-wol
+    git pull
+fi
 
 cp $DIR/*/service/*.service /etc/systemd/system/
 
diff --git a/postinstall_reseau.sh b/postinstall_reseau.sh
index 4258d5d..f34fc33 100755
--- a/postinstall_reseau.sh
+++ b/postinstall_reseau.sh
@@ -24,7 +24,14 @@ apt-eole update
 apt-eole install \
     git \
     xrdp
-git clone https://gitlab.tetras-libre.fr/tetras-libre/eole-wol
+if [ ! -e "eole-wol" ]
+then
+    git clone https://gitlab.tetras-libre.fr/tetras-libre/eole-wol
+else
+    cd eole-wol
+    git pull
+    cd -
+fi
 
 chown -R www-data:www-data eole-wol/wol/www
 
-- 
GitLab