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 @@ -42,6 +42,13 @@ as_user() (
4242 set +x
4343 local COMMAND=" $1 "
4444 local WORKING_DIR=" $2 "
45+
46+ if [ " true" = " $NON_PRIVILEGED_USER " ]; then
47+ set -x
48+ /bin/bash -c " cd '$WORKING_DIR '; $COMMAND "
49+ return " $? "
50+ fi
51+
4552 local USER=" $3 "
4653 if [ -z " $COMMAND " ]; then
4754 return 1;
You can’t perform that action at this time.
0 commit comments