2023-03-20 02:56:52 -04:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
set -e
|
2023-05-03 02:01:27 -04:00
|
|
|
# verbose
|
|
|
|
set -x
|
2023-03-20 02:56:52 -04:00
|
|
|
|
|
|
|
log_info 'Setting ownership ...'
|
|
|
|
|
|
|
|
# root
|
|
|
|
chown root /tmp/nginx
|
|
|
|
|
|
|
|
# npmuser
|
2023-03-29 19:04:37 -04:00
|
|
|
chown -R "$PUID:$PGID" /data \
|
|
|
|
/etc/letsencrypt \
|
|
|
|
/run/nginx \
|
|
|
|
/tmp/nginx \
|
|
|
|
/var/cache/nginx \
|
|
|
|
/var/lib/logrotate \
|
|
|
|
/var/lib/nginx \
|
|
|
|
/var/log/nginx
|
2023-03-27 20:39:26 -04:00
|
|
|
|
|
|
|
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
2023-03-29 19:04:37 -04:00
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/nginx \
|
|
|
|
/etc/nginx/nginx.conf \
|
|
|
|
/etc/nginx/conf.d
|