From c1f64747e8890bc208cb9259c899609e3a4680b5 Mon Sep 17 00:00:00 2001
From: Griefed <griefed@griefed.de>
Date: Sat, 17 Oct 2020 23:14:36 +0200
Subject: [PATCH] Sigh

---
 root/etc/cont-init.d/50-install |  2 +-
 root/etc/cont-init.d/60-config  | 11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/root/etc/cont-init.d/50-install b/root/etc/cont-init.d/50-install
index 3635f94..d9800cf 100644
--- a/root/etc/cont-init.d/50-install
+++ b/root/etc/cont-init.d/50-install
@@ -9,5 +9,5 @@ if [ ! -f "/config/www/ICEcoder/index.php" ]; then
 	mv ICEcoder-* /app/ICEcoder
 	cd / || exit
 	rm -rf /tmp/* /config/www/data
-	chown -R abc:abc /app/ICEcoder /data
+	chown -R abc:abc /app/ICEcoder
 fi
diff --git a/root/etc/cont-init.d/60-config b/root/etc/cont-init.d/60-config
index ef9d967..6ad0aeb 100644
--- a/root/etc/cont-init.d/60-config
+++ b/root/etc/cont-init.d/60-config
@@ -8,11 +8,11 @@ if [ ! -e /lock.file ]; then
     -i /etc/sudoers
   sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group
   # create directory for project
-  mkdir -p /data/code
+  mkdir -p /app/ICEcoder/data/code
   # make sure URL is set and folder is empty to clone code
-  if [ ${GITURL+x} ] && [ ! "$(/bin/ls -A /data/code 2>/dev/null)" ] ; then \
+  if [ ${GITURL+x} ] && [ ! "$(/bin/ls -A /app/ICEcoder/data/code 2>/dev/null)" ] ; then \
     # clone the url the user passed to this directory
-    git clone "${GITURL}" /data/code
+    git clone "${GITURL}" /app/ICEcoder/data/code
   fi
 else
   # lock exists not importing project this is a restart
@@ -38,8 +38,9 @@ cp /etc/php7/php.ini /config/php/php.ini
 cp /config/php/php.ini /etc/php7/php.ini
 
 # Link data, code and plugins
-ln -sf /data/code /app/ICEcoder/data
-ln -sf /data/plugins /app/ICEcoder/plugins
+rm /data && \
+    ln -sf /app/ICEcoder/data /data
+    ln -sf /app/ICEcoder/plugins /data/plugins
 
 # permissions
 chown -R abc:abc \
-- 
GitLab