Skip to content

Commit

Permalink
Added env variables that would allow setting of uid/gid for ldap and …
Browse files Browse the repository at this point in the history
…nginx user
  • Loading branch information
mlgupta committed Oct 12, 2020
1 parent d7f1c95 commit a1125d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion container/service/gunicorn/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions container/service/nginx/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions container/service/slapd/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a1125d0

Please sign in to comment.