From 6ca675d7998174f01085f5f78b7f5a076466733e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Filip=20Str=C3=B6mb=C3=A4ck?= <filip.stromback@liu.se>
Date: Fri, 7 Jan 2022 16:15:07 +0100
Subject: [PATCH] Fixed the update logic for TAL.

---
 files/tal/on_update.sh | 2 ++
 manifests/tal_cli.pp   | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/files/tal/on_update.sh b/files/tal/on_update.sh
index 6b2493b..3eb85f1 100644
--- a/files/tal/on_update.sh
+++ b/files/tal/on_update.sh
@@ -1,5 +1,7 @@
 #!/usr/bin/bash
 
+cd source
+
 git submodule init
 git submodule update
 
diff --git a/manifests/tal_cli.pp b/manifests/tal_cli.pp
index ac916b2..27d4075 100644
--- a/manifests/tal_cli.pp
+++ b/manifests/tal_cli.pp
@@ -21,7 +21,7 @@ class aes::tal_cli(
     ensure  => file,
     owner   => examadm,
     group   => examadm,
-    mode    => '0700',
+    mode    => '0600',
     content => $credentials,
   }
 
@@ -37,6 +37,6 @@ class aes::tal_cli(
     command => '/opt/utils/update_repo.sh /home/examadm/tal-cli/source https://oauth2:glpat-bfpVssm_zFmt1YRW7cLz@gitlab.liu.se/upp-aes/tal-cli.git master',
     user    => examadm,
     group   => examadm,
-    cwd     => '/home/examadm/tal-cli/source',
+    cwd     => '/home/examadm/tal-cli',
   }
 }
-- 
GitLab