diff --git a/rmm-tasks/ESPO-03-First-Deploy.sh b/rmm-tasks/ESPO-03-First-Deploy.sh index a633652..c70adc2 100755 --- a/rmm-tasks/ESPO-03-First-Deploy.sh +++ b/rmm-tasks/ESPO-03-First-Deploy.sh @@ -68,7 +68,11 @@ echo "--- Container" docker compose -f /srv/espo/docker-compose.yml ps --format 'table {{.Name}}\t{{.Status}}' echo "--- Instanz" echo "FQDN: $FQDN (Ring $RING)" -echo "Version: $(grep -oP "'version'\s*=>\s*'\K[^']+" /srv/espo/data/config.php 2>/dev/null || echo unbekannt)" +# Die Version steht je nach Stand in config.php oder in config-internal.php - EspoCRM selbst +# fragen ist verlaesslicher als eine der beiden Dateien zu raten. +VERSION="$(docker exec espocrm php -r '$a=@include "data/config.php"; $b=@include "data/config-internal.php"; $c=array_merge(is_array($a)?$a:[], is_array($b)?$b:[]); echo $c["version"] ?? "";' 2>/dev/null)" +[ -n "$VERSION" ] || VERSION="$(grep -hoP "['\"]version['\"]\s*=>\s*['\"]\K[^'\"]+" /srv/espo/data/config.php /srv/espo/data/config-internal.php 2>/dev/null | head -1)" +echo "Version: ${VERSION:-unbekannt}" IMAGE="$(docker inspect -f '{{.Config.Image}}' espocrm 2>/dev/null)" echo "Image: $IMAGE" echo "Digest: $(docker image inspect --format '{{if .RepoDigests}}{{index .RepoDigests 0}}{{else}}{{.Id}}{{end}}' "$IMAGE" 2>/dev/null)"