Fix ommissions in previous commit

This commit is contained in:
Deon George 2021-06-09 12:34:43 +10:00
parent 1111afcb5f
commit afe65b2618

8
init
View File

@ -8,7 +8,8 @@ composer=${COMPOSER_DIR:-/var/www/.composer}
NGINX_START=${NGINX_START:-TRUE}
SSH_START=${SSH_START:-FALSE}
REDIS_START=${SSH_START:-FALSE}
REDIS_START=${REDIS_START:-FALSE}
MEMCACHED_START=${MEMCACHED_START:-FALSE}
# To run a local queue, running jobs from the queue "hostname"
LOCAL_QUEUE=${LOCAL_QUEUE:-FALSE}
@ -33,15 +34,18 @@ function nginx_start() {
# General Setup
if [ -x /usr/sbin/sshd -a "${SSH_START}" == "TRUE" ]; then
echo "* Starting SSH..."
[ ! -d /var/run/sshd ] && mkdir /var/run/sshd
start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22
fi
if [ -x /usr/bin/redis-server -a "${REDIS_START}" == "TRUE" ]; then
echo "* Starting REDIS..."
start-stop-daemon --start --quiet --oknodo --umask 007 --pidfile /var/run/redis-server.pid --chuid redis:redis --exec /usr/bin/redis-server -- /etc/redis/redis.conf
fi
if [ -x /usr/bin/memcached -a "${REDIS_START}" == "TRUE" ]; then
if [ -x /usr/bin/memcached -a "${MEMCACHED_START}" == "TRUE" ]; then
echo "* Starting MEMCACHED..."
start-stop-daemon --start --quiet --exec "/usr/share/memcached/scripts/start-memcached" -- /etc/memcached.conf /var/run/memcached.pid
fi