cx-conndev: afficher les erreurs
This commit is contained in:
parent
7524a2869a
commit
cbb34ecd3f
11
cx-conndev
11
cx-conndev
|
@ -44,10 +44,15 @@ fi
|
|||
|
||||
###
|
||||
|
||||
setx cid=docker-compose ps -q "$service" 2>/dev/null || die "$service: service introuvable"
|
||||
function die_not_found() { die "$service: service introuvable"; }
|
||||
setx cid=docker-compose ps -q "$service" 2>/dev/null || die_not_found
|
||||
[ -n "$cid" ] || die_not_found
|
||||
edebug "$service id: $cid"
|
||||
|
||||
setx ip=docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$cid"
|
||||
edebug "$service: $ip"
|
||||
function die_not_found() { die "$service: $cid: ip introuvable"; }
|
||||
setx ip=docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$cid" || die_not_found
|
||||
[ -n "$ip" ] || die_not_found
|
||||
edebug "$service ip: $ip"
|
||||
|
||||
mysqlcmd="$(php bin/conndev.php "$ip" "$@")"
|
||||
edebug "mysqlcmd: $mysqlcmd"
|
||||
|
|
Loading…
Reference in New Issue