diff --git a/run/scripts/run b/run/scripts/run index 93a7f8dd93d6031963f897b9972a0e2e7ef4b0e9..85d89f77fcaf488733e0bf24a31dcf83a21b8a78 100755 --- a/run/scripts/run +++ b/run/scripts/run @@ -9,6 +9,19 @@ if [[ "$L3D_CONFIG" != "[]" ]]; then export PHP_VERSION=$V fi fi +if [[ "$L3D_COMPOSE" != "[]" ]]; then + V=$(yq .name $L3D_COMPOSE) + if [[ "$V" != "null" ]]; then + export COMPOSE_PROJECT_NAME=$V + fi + if [[ ! -n ${PHP_VERSION} ]]; then + V=$(yq .services.php.image $L3D_COMPOSE | cut -d':' -f 2) + if [[ "$V" != "null" ]]; then + export PHP_VERSION=$V + fi + fi + rm "$L3D_COMPOSE" +fi COMMAND=start if [[ -n "$1" ]]; then diff --git a/run/scripts/start b/run/scripts/start index d722df18a621d5633844cb08c0e4b72a725b7f95..66768e8d1e5f38e072def48927266b9aac733220 100755 --- a/run/scripts/start +++ b/run/scripts/start @@ -1,17 +1,6 @@ #!/bin/bash function getConfig() { - if [[ "$L3D_COMPOSE" != "[]" ]]; then - V=$(yq .name $L3D_COMPOSE) - if [[ "$V" != "null" ]]; then - COMPOSE_PROJECT_NAME=$V - fi - V=$(yq .services.php.image $L3D_COMPOSE | cut -d':' -f 2) - if [[ "$V" != "null" ]]; then - PHP_VERSION=$V - fi - rm "$L3D_COMPOSE" - fi if [[ ! -n ${PHP_VERSION} ]]; then while true; do DEFAULT=8.2