File tree Expand file tree Collapse file tree
nginx/etc/confd/templates/nginx
php/nginx/etc/confd/templates
ubuntu/16.04/usr/local/share/bootstrap Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{ if not (eq " true" (getenv " NON_PRIVILEGED_USER" )) }}
12user www-data;
3+ {{ end }}
24worker_processes auto;
35pid /run/nginx.pid ;
46
Original file line number Diff line number Diff line change 1+ {{ if not (eq " true" (getenv " NON_PRIVILEGED_USER" )) }}
12user www-data;
3+ {{ end }}
24worker_processes auto;
35pid /run/nginx.pid ;
46
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ clear_env = no
77
88listen = /run/php{{ getenv " PHP_VERSION" }}-fpm.sock
99
10+ {{ if not (eq " true" (getenv " NON_PRIVILEGED_USER" )) }}
1011listen.owner = www-data
1112listen.group = www-data
13+ {{ end }}
1214
1315pm = dynamic
1416
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ stdout_logfile_maxbytes=0
55stderr_logfile= /dev/stderr
66stderr_logfile_maxbytes= 0
77loglevel = warn
8+ {{ if not (eq " true" (getenv " NON_PRIVILEGED_USER" )) }}
89user = root
10+ {{ end }}
911autostart = {{ getenv " START_NGINX" }}
1012autorestart = true
1113priority = 5
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ stdout_logfile=/dev/stdout
44stdout_logfile_maxbytes= 0
55stderr_logfile= /dev/stderr
66stderr_logfile_maxbytes= 0
7+ {{ if not (eq " true" (getenv " NON_PRIVILEGED_USER" )) }}
78user = root
9+ {{ end }}
810autostart = {{ getenv " START_PHP_FPM" }}
911autorestart = true
1012priority = 5
Original file line number Diff line number Diff line change @@ -39,9 +39,15 @@ get_user_home_directory() {
3939}
4040
4141as_user () (
42- set +x
4342 local COMMAND=" $1 "
4443 local WORKING_DIR=" $2 "
44+
45+ if [ " true" = " $NON_PRIVILEGED_USER " ];
46+ /bin/bash -c " cd '$WORKING_DIR '; $COMMAND "
47+ return " $? "
48+ fi
49+
50+ set +x
4551 local USER=" $3 "
4652 if [ -z " $COMMAND " ]; then
4753 return 1;
You can’t perform that action at this time.
0 commit comments