summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2021-11-30 17:00:47 +0300
committerKonstantin Pavlov <thresh@nginx.com>2021-11-30 17:00:47 +0300
commitc58601c11fd2f2c583d94f31b63c7d16319a2614 (patch)
treea80318e03a0230bbf315ddb6892bf3a0a2f3b66b
parentca0dc2954c254081a9b23c1e1f760de0c3fadc66 (diff)
downloadunit-c58601c11fd2f2c583d94f31b63c7d16319a2614.tar.gz
unit-c58601c11fd2f2c583d94f31b63c7d16319a2614.tar.bz2
Docker: respect the binary from CMD in the entrypoint.
-rwxr-xr-xpkg/docker/docker-entrypoint.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/docker/docker-entrypoint.sh b/pkg/docker/docker-entrypoint.sh
index f455a958..59529925 100755
--- a/pkg/docker/docker-entrypoint.sh
+++ b/pkg/docker/docker-entrypoint.sh
@@ -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