Bladeren bron

Have labkey installation script install required directories for labkey

Andrej 1 dag geleden
bovenliggende
commit
1a129b82ab
2 gewijzigde bestanden met toevoegingen van 21 en 7 verwijderingen
  1. 6 1
      README.md
  2. 15 6
      bin/installLabkey.sh

+ 6 - 1
README.md

@@ -22,7 +22,7 @@ cd
 git clone https://git0.fmf.uni-lj.si/studen/labkeyDocker.git
 ```
 
-### Data base
+### Database
 
 Create directory or copy appropriate database cluster to `labkeyDocker/postgresql/data`:
 
@@ -38,6 +38,11 @@ docker logs config-labkey-db-1
 labkeyDocker/bin/stopLabkey.sh
 ```
 
+### Files and external modules for LabKey
+
+If old files and external modules are available, they should be either copied or linked to labkeyDocker/labkeyBase/files and labkeyDocker/labkeyBase/externalModules.
+
+
 ### Install LabKey binaries
 
 - run `labkeyDocker/bin/installLabkey.sh 22.3` to unzip the enclosed LabKey binary code and make appropriate links.

+ 15 - 6
bin/installLabkey.sh

@@ -52,19 +52,28 @@ fi;
 cd ${TMP_DIR} && tar xvzf ${SFW_SRC};
 echo "Using distribution in ${TMP_LABKEY}";
 
-#LINK_DIRS=("tomcat-lib" "labkeywebapp" "modules" "pipeline-lib")
-LABKEY_DIRS=("labkeywebapp" "modules" "pipeline-lib")
-
 #copy from $TMP_LABKEY to labkey space in docker
-for d in ${LABKEY_DIRS[@]} ; 
+LABKEY_SRC_DIRS=("labkeywebapp" "modules" "pipeline-lib")
+
+for d in ${LABKEY_SRC_DIRS[@]} ; 
 do
    mv ${TMP_LABKEY}/$d ${LABKEY_DIR}/$d;
 done;
 
+#check if required dirs are missing and create them
+LABKEY_DIRS=("files" "externalModules")
+
+for d in ${LABKEY_DIRS[@]} ; 
+do
+   if [ ! -d ${LABKEY_DIR}/$d ] ; then
+      mkdir ${LABKEY_DIR}/$d;
+   fi;
+done;
+
 #tomcat-lib goes to tomcat8 user space in docker
-mv ${TMP_LABKEY}/tomcat-lib ${TOMCAT_DIR/lib
+mv ${TMP_LABKEY}/tomcat-lib ${TOMCAT_DIR}/lib
 
 echo "Cleanup";
-#rm -rf ${TMP_LABKEY}
+rm -rf ${TMP_LABKEY}
 
 echo "Done"