From e851a5324f61a6fc7ad63bf336ec907da69a2cea Mon Sep 17 00:00:00 2001
From: David Beniamine <david@beniamine.net>
Date: Tue, 15 Sep 2020 14:37:57 +0200
Subject: [PATCH] Fix bad path in post install

Fix #24
---
 postinstall_partage.sh | 4 ++--
 postinstall_reseau.sh  | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/postinstall_partage.sh b/postinstall_partage.sh
index 19b3922..4c2b14c 100755
--- a/postinstall_partage.sh
+++ b/postinstall_partage.sh
@@ -16,8 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-DIR=$(realpath $(dirname $0))
-
 cd /opt
 
 if [ "$(dpkg -l | grep git)" ]
@@ -40,6 +38,8 @@ else
     git pull origin master
 fi
 
+DIR=$PWD
+
 cp -v $DIR/*/service/*.service /etc/systemd/system/
 
 dpkg -i cups/deb/*.deb
diff --git a/postinstall_reseau.sh b/postinstall_reseau.sh
index d8c6d88..f818a34 100755
--- a/postinstall_reseau.sh
+++ b/postinstall_reseau.sh
@@ -16,8 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-DIR=$(dirname $0)
-
 cd /var/www
 
 if [ "$(dpkg -l | grep git)" ]
-- 
GitLab