Skip to content
Snippets Groups Projects
Commit b3fd11d4 authored by jurgenhaas's avatar jurgenhaas
Browse files

#106 Call cleanup from l3drun and not already from within the project's l3d container

parent b39422c4
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,12 @@ function getConfig() { ...@@ -30,6 +30,12 @@ function getConfig() {
fi fi
} }
function exitContainer() {
if [[ "$L3D_ALWAYS_CLEANUP" == "1" ]]; then
/usr/local/bin/.delete $COMPOSE_PROJECT_NAME
fi
}
function startContainer() { function startContainer() {
if [[ -n ${COMPOSE_PROJECT_NAME} ]]; then if [[ -n ${COMPOSE_PROJECT_NAME} ]]; then
mode=REBUILD mode=REBUILD
...@@ -93,6 +99,7 @@ function startContainer() { ...@@ -93,6 +99,7 @@ function startContainer() {
"${start_params[@]}" \ "${start_params[@]}" \
registry.lakedrops.com/docker/l3d/php-${PHP_VERSION}:${L3DVERSION} \ registry.lakedrops.com/docker/l3d/php-${PHP_VERSION}:${L3DVERSION} \
/usr/local/bin/.start /usr/local/bin/.start
exitContainer
return return
fi fi
fi fi
...@@ -102,6 +109,7 @@ function startContainer() { ...@@ -102,6 +109,7 @@ function startContainer() {
--env SSHAUTH=${SSHAUTH} \ --env SSHAUTH=${SSHAUTH} \
${COMPOSE_PROJECT_NAME}_l3d \ ${COMPOSE_PROJECT_NAME}_l3d \
/usr/local/bin/.start /usr/local/bin/.start
exitContainer
fi fi
} }
......
...@@ -259,7 +259,3 @@ if [[ -x "${L3DSHELL}" ]]; then ...@@ -259,7 +259,3 @@ if [[ -x "${L3DSHELL}" ]]; then
else else
/usr/bin/fish /usr/bin/fish
fi fi
if [[ "$L3D_ALWAYS_CLEANUP" == "1" ]]; then
/usr/local/bin/.delete $COMPOSE_PROJECT_NAME
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment