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 ca0dc2954c
commit c58601c11f

View File

@@ -24,7 +24,7 @@ if [ "$1" = "unitd" -o "$1" = "unitd-debug" ]; then
else else
if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -print -quit 2>/dev/null | /bin/grep -q .; then 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..." 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 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 # even when the control socket exists, it does not mean unit has finished initialisation