Docker: respect the binary from CMD in the entrypoint.

This commit is contained in:
Konstantin Pavlov
2021-11-30 17:00:47 +03:00
parent bc4968d1d7
commit 380f2dc2ba

View File

@@ -24,7 +24,7 @@ if [ "$1" = "unitd" -o "$1" = "unitd-debug" ]; then
else
if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -print -quit 2>/dev/null | /bin/grep -q .; then
echo "$0: /docker-entrypoint.d/ is not empty, launching Unit daemon to perform initial configuration..."
/usr/sbin/unitd --control unix:/var/run/control.unit.sock
/usr/sbin/$1 --control unix:/var/run/control.unit.sock
while [ ! -S /var/run/control.unit.sock ]; do echo "$0: Waiting for control socket to be created..."; /bin/sleep 0.1; done
# even when the control socket exists, it does not mean unit has finished initialisation