wordpress/init

22 lines
577 B
Plaintext
Raw Normal View History

2017-12-13 10:54:20 +00:00
#!/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
2017-12-13 22:40:56 +00:00
[ ! -d /var/run/sshd ] && mkdir /var/run/sshd
start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22
fi
2017-12-13 10:54:20 +00:00
nginx_start
2018-02-02 10:14:10 +00:00
exec /usr/local/bin/docker-entrypoint.sh "$@"