Bladeren bron

ability to run custom sql after the installation

Alex Trofimov 11 maanden geleden
bovenliggende
commit
a2939152eb
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      docker-entrypoint.sh

+ 6 - 0
docker-entrypoint.sh

@@ -55,6 +55,12 @@ find . -exec chown $UNA_USER:$UNA_USER {} \+ || true
 # Install
 
 if [ -d "install" ] && [ ! -f "inc/header.inc.php" ]; then
+
+    if [ -f /tmp/addon.sql ]; then
+        echo "Found additional SQL file..."
+        cat /tmp/addon.sql >> ./install/sql/addon.sql
+    fi
+
     su $UNA_USER -c "php ./install/cmd.php \
         --db_host=$(qs ${UNA_DB_HOST:-$VAR_DEF_DB_HOST}) \
         --db_port=$(qs ${UNA_DB_PORT:-$VAR_DEF_DB_PORT}) \