don't require sudo for tailing logs since we're root anyway

This commit is contained in:
Michael Hobbs
2015-09-15 10:15:22 -07:00
parent cca49230d9
commit 72a1b76b63
3 changed files with 2 additions and 4 deletions

View File

@@ -175,7 +175,7 @@ EOF
NGINX_LOGS_ARGS="-n 20"
fi
sudo tail "$NGINX_LOGS_ARGS" "$NGINX_LOGS_PATH"
tail "$NGINX_LOGS_ARGS" "$NGINX_LOGS_PATH"
;;
help | nginx:help)

View File

@@ -4,12 +4,10 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$DOKKU_DISTRO" in
ubuntu)
echo "%dokku ALL=(ALL) NOPASSWD:/etc/init.d/nginx reload, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx
echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/tail" >> /etc/sudoers.d/dokku-nginx
;;
opensuse)
echo "%dokku ALL=(ALL) NOPASSWD:/sbin/service nginx reload, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx
echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/tail" >> /etc/sudoers.d/dokku-nginx
;;
esac