This commit is contained in:
Jephté Clain 2019-01-14 16:09:03 +04:00
parent 41089f7ed0
commit edaaec19ee
1 changed files with 18 additions and 14 deletions

32
dk
View File

@ -267,13 +267,15 @@ function auto_up() {
}
function default_compose_service() {
local docker_compose="$(which docker-compose)"
if [ -z "$docker_compose" -a -x /usr/bin/docker-compose ]; then
docker_compose=/usr/bin/docker-compose
elif [ -z "$docker_compose" -a -x /usr/local/bin/docker-compose ]; then
docker_compose=/usr/local/bin/docker-compose
else
die "Impossible de trouver docker-compose"
local docker_compose="$(which docker-compose 2>/dev/null)"
if [ -z "$docker_compose" ]; then
if [ -x /usr/bin/docker-compose ]; then
docker_compose=/usr/bin/docker-compose
elif [ -x /usr/local/bin/docker-compose ]; then
docker_compose=/usr/local/bin/docker-compose
else
die "Impossible de trouver docker-compose"
fi
fi
setx startcmd=qvals "$docker_compose" \
"${replace_env_args[@]}" "${env_args[@]}" \
@ -282,13 +284,15 @@ function default_compose_service() {
setx stopcmd=qvals "$docker_compose" down
}
function default_docker_service() {
local docker="$(which docker)"
if [ -z "$docker" -a -x /usr/bin/docker ]; then
docker=/usr/bin/docker
elif [ -z "$docker" -a -x /usr/local/bin/docker ]; then
docker=/usr/local/bin/docker
else
die "Impossible de trouver docker"
local docker="$(which docker 2>/dev/null)"
if [ -z "$docker" ]; then
if [ -x /usr/bin/docker ]; then
docker=/usr/bin/docker
elif [ -x /usr/local/bin/docker ]; then
docker=/usr/local/bin/docker
else
die "Impossible de trouver docker"
fi
fi
setx startcmd=qvals "$docker" run \
"${replace_env_args[@]}" "${env_args[@]}" \