Adds --remove-orphans flag to down command, incase the yaml file changed
This commit is contained in:
parent
4092c4beb5
commit
f6d35ae9f7
@ -1560,7 +1560,7 @@ function joomla__TRuST__disable() {
|
|||||||
# this means we have a single already selected container to enable if it exists
|
# this means we have a single already selected container to enable if it exists
|
||||||
if [ -d "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}" ]; then
|
if [ -d "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}" ]; then
|
||||||
# make sure the docker image is stopped
|
# make sure the docker image is stopped
|
||||||
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}/docker-compose.yml" down
|
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}/docker-compose.yml" down --remove-orphans
|
||||||
# then remove soft link
|
# then remove soft link
|
||||||
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}"
|
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}"
|
||||||
else
|
else
|
||||||
@ -1585,7 +1585,7 @@ function joomla__TRuST__disable() {
|
|||||||
# remove the " from the string
|
# remove the " from the string
|
||||||
container="${containered//\"/}"
|
container="${containered//\"/}"
|
||||||
# make sure the docker image is stopped
|
# make sure the docker image is stopped
|
||||||
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}/docker-compose.yml" down
|
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}/docker-compose.yml" down --remove-orphans
|
||||||
# then remove soft link
|
# then remove soft link
|
||||||
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}"
|
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}"
|
||||||
done
|
done
|
||||||
@ -1603,7 +1603,7 @@ function openssh__TRuST__disable() {
|
|||||||
# this means we have a single already selected container to enable if it exists
|
# this means we have a single already selected container to enable if it exists
|
||||||
if [ -d "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}" ]; then
|
if [ -d "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}" ]; then
|
||||||
# make sure the docker image is stopped
|
# make sure the docker image is stopped
|
||||||
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}/docker-compose.yml" down
|
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}/docker-compose.yml" down --remove-orphans
|
||||||
# then remove soft link
|
# then remove soft link
|
||||||
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}"
|
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${VDM_CONTAINER}"
|
||||||
else
|
else
|
||||||
@ -1628,7 +1628,7 @@ function openssh__TRuST__disable() {
|
|||||||
# remove the " from the string
|
# remove the " from the string
|
||||||
container="${containered//\"/}"
|
container="${containered//\"/}"
|
||||||
# make sure the docker image is stopped
|
# make sure the docker image is stopped
|
||||||
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}/docker-compose.yml" down
|
docker-compose --file "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}/docker-compose.yml" down --remove-orphans
|
||||||
# then remove soft link
|
# then remove soft link
|
||||||
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}"
|
rm -rf "${VDM_REPO_PATH}/${VDM_CONTAINER_TYPE}/enabled/${container}"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user