diff --git a/setup.sh b/setup.sh index 029813ec..ac2d7e29 100755 --- a/setup.sh +++ b/setup.sh @@ -27,11 +27,12 @@ fi INFO=$($CRI ps \ --no-trunc \ - --format="{{.Image}} {{.Names}} {{.Command}}" | \ - grep "supervisord -c /etc/supervisor/supervisord.conf") + --format "{{.Image}};{{.Names}}" \ + --filter label=org.label-schema.name="docker-mailserver" | \ + tail -1) -IMAGE_NAME=$(echo $INFO | awk '{print $1}') -CONTAINER_NAME=$(echo $INFO | awk '{print $2}') +IMAGE_NAME=${INFO%;*} +CONTAINER_NAME=${INFO#*;} DEFAULT_CONFIG_PATH="$(pwd)/config" USE_CONTAINER=false