From 2b5b5aaa517e3698f1902c071277e9d5b9bda60d Mon Sep 17 00:00:00 2001
From: Tomasz Wolniewicz <twoln@umk.pl>
Date: Tue, 25 Jul 2023 08:38:11 +0200
Subject: [PATCH] a more sophisticated way of getting the script directory

---
 scripts/update_coco.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 scripts/update_coco.sh

diff --git a/scripts/update_coco.sh b/scripts/update_coco.sh
old mode 100755
new mode 100644
index 76a0c77..e65d1f7
--- a/scripts/update_coco.sh
+++ b/scripts/update_coco.sh
@@ -1,3 +1,4 @@
 #!/bin/bash
-cd /var/www/html/technical/scripts; /usr/bin/php CoCointerface.php 1> /dev/null 2>>/var/log/coco_error.log
-
+spath="$(readlink -n -f "$0")"
+cd "$(dirname "$spath")"
+/usr/bin/php CoCointerface.php 1> /dev/null 2>>/var/log/coco_error.log
-- 
GitLab