From a1125d0519f283b695a43f865d5ae3dda9988212 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Sun, 11 Oct 2020 21:10:19 -0500 Subject: [PATCH] Added env variables that would allow setting of uid/gid for ldap and nginx user --- container/service/gunicorn/startup.sh | 2 +- container/service/nginx/startup.sh | 1 + container/service/slapd/startup.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/container/service/gunicorn/startup.sh b/container/service/gunicorn/startup.sh index 186c76b..31df6d8 100755 --- a/container/service/gunicorn/startup.sh +++ b/container/service/gunicorn/startup.sh @@ -18,7 +18,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then touch $FIRST_START_DONE fi -log-helper info 'Setting UID/GID for nginx to ${NGINX_UID}/${NGINX_GID}' +log-helper info "Setting UID/GID for nginx to ${NGINX_UID}/${NGINX_GID}" [ "$(id -g nginx)" -eq ${NGINX_GID} ] || groupmod -g ${NGINX_GID} nginx [ "$(id -u nginx)" -eq ${NGINX_UID} ] || usermod -u ${NGINX_UID} -g ${NGINX_GID} nginx diff --git a/container/service/nginx/startup.sh b/container/service/nginx/startup.sh index 44cc34e..9ffb226 100755 --- a/container/service/nginx/startup.sh +++ b/container/service/nginx/startup.sh @@ -18,6 +18,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then touch $FIRST_START_DONE fi +log-helper info "Setting UID/GID for nginx to ${NGINX_UID}/${NGINX_GID}" [ "$(id -g nginx)" -eq ${NGINX_GID} ] || groupmod -g ${NGINX_GID} nginx [ "$(id -u nginx)" -eq ${NGINX_UID} ] || usermod -u ${NGINX_UID} -g ${NGINX_GID} nginx diff --git a/container/service/slapd/startup.sh b/container/service/slapd/startup.sh index 231ce7b..a4fd8ea 100755 --- a/container/service/slapd/startup.sh +++ b/container/service/slapd/startup.sh @@ -15,6 +15,7 @@ log-helper level eq trace && set -x ulimit ${LDAP_NOFILE} +log-helper info "Setting UID/GID for ldap to ${LDAP_UID}/${LDAP_GID}" [ "$(id -g ldap)" -eq ${LDAP_GID} ] || groupmod -g ${LDAP_GID} ldap [ "$(id -u ldap)" -eq ${LDAP_UID} ] || usermod -u ${LDAP_UID} -g ${LDAP_GID} ldap