From 157ab8609bb076d94b255a24b3993d5c358f4177 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 14 Dec 2017 09:40:56 +1100 Subject: [PATCH] Control start of SSH --- start | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start b/start index c9f92a1..2b2c214 100755 --- a/start +++ b/start @@ -1,8 +1,8 @@ #!/bin/sh -set -ex -[ ! -d /var/run/sshd ] && mkdir /var/run/sshd -[ -x /usr/sbin/sshd ] && start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22 +if [ -x /usr/sbin/sshd -a "${SSH_START}" = "TRUE" ]; then + [ ! -d /var/run/sshd ] && mkdir /var/run/sshd + start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22 +fi -echo "Starting php [$@]" exec /usr/local/bin/docker-php-entrypoint "$@"