From 61c15ae1cd0e0b72ecb027e1b9151b6eadc1adcf Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Fri, 28 Sep 2018 14:43:52 +0200
Subject: [PATCH] Fix bad service init

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

diff --git a/postinstall_partage.sh b/postinstall_partage.sh
index 319ee08..3c797e0 100755
--- a/postinstall_partage.sh
+++ b/postinstall_partage.sh
@@ -29,7 +29,7 @@ apt-eole install -y \
 git clone https://gitlab.tetras-libre.fr/tetras-libre/eole-wol
 cd eole-wol
 
-cp */service/*.service /etc/systemd/system/
+cp $DIR/*/service/*.service /etc/systemd/system/
 
 # Adding services
 systemctl daemon-reload
diff --git a/postinstall_reseau.sh b/postinstall_reseau.sh
index dbbaf4e..8de46cb 100755
--- a/postinstall_reseau.sh
+++ b/postinstall_reseau.sh
@@ -16,17 +16,12 @@
 # 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
-DIR=`dirname $0`
 
 apt-eole update
 apt-eole install -y git
 git clone https://gitlab.tetras-libre.fr/tetras-libre/eole-wol
 
 chown -R www-data:www-data eole-wol/wol/www
-
-cp $DIR/wol/service/wakeonlan.service /etc/systemd/system/
-systemctl daemon-reload
-systemctl start wakeonlan
-systemctl enable wakeonlan
-systemctl status wakeonlan
-- 
GitLab