Merge pull request #1585 from progrium/1572_mh-nginx-log-perms
make sure dokku can read nginx logs and don't remove other perms
This commit is contained in:
2
dokku
2
dokku
@@ -41,7 +41,7 @@ if [[ "${args[0]}" =~ ^--.* ]]; then
|
|||||||
fi
|
fi
|
||||||
! has_tty && DOKKU_QUIET_OUTPUT=1
|
! has_tty && DOKKU_QUIET_OUTPUT=1
|
||||||
|
|
||||||
if [[ $(id -un) != "dokku" && $1 != plugin:*install* && $1 != "plugin:update" && $1 != nginx:*-logs ]]; then
|
if [[ $(id -un) != "dokku" && $1 != plugin:*install* && $1 != "plugin:update" ]]; then
|
||||||
sudo -u dokku -E -H $0 "$@"
|
sudo -u dokku -E -H $0 "$@"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ fi
|
|||||||
|
|
||||||
echo 'server_names_hash_bucket_size 512;' >| /etc/nginx/conf.d/server_names_hash_bucket_size.conf
|
echo 'server_names_hash_bucket_size 512;' >| /etc/nginx/conf.d/server_names_hash_bucket_size.conf
|
||||||
|
|
||||||
|
# make sure dokku can read the default log dir
|
||||||
|
gpasswd -M "$(egrep ^adm /etc/group | awk -F ":" '{ print $4 }')" dokku
|
||||||
|
chgrp -R dokku /var/log/nginx
|
||||||
|
chmod g+r /var/log/nginx
|
||||||
|
|
||||||
case "$DOKKU_DISTRO" in
|
case "$DOKKU_DISTRO" in
|
||||||
ubuntu)
|
ubuntu)
|
||||||
/etc/init.d/nginx start
|
/etc/init.d/nginx start
|
||||||
|
|||||||
Reference in New Issue
Block a user