#!/bin/sh NO_NGINX=${NO_NGINX:-TRUE} SSH_START=${SSH_START:-FALSE} function nginx_start() { # Start NGINX if [ -x /usr/sbin/nginx -a "${NO_NGINX}" != "TRUE" ]; then echo "* Starting NGINX..." start-stop-daemon --start --pidfile /var/run/nginx.pid --exec /usr/sbin/nginx -- -g 'daemon on; master_process on;' fi } 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 nginx_start exec /usr/local/bin/docker-entrypoint.sh "$@"