Skip to content

Instantly share code, notes, and snippets.

@sheharyarn
Created June 27, 2015 20:31
Show Gist options
  • Save sheharyarn/f3d98e8cc859f092532b to your computer and use it in GitHub Desktop.
Save sheharyarn/f3d98e8cc859f092532b to your computer and use it in GitHub Desktop.

Revisions

  1. sheharyarn created this gist Jun 27, 2015.
    14 changes: 14 additions & 0 deletions nginx.overrides
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # Enter this command to create a sudoers override/include file:
    # sudo visudo -f /etc/sudoers.d/nginx.overrides

    # (Make sure you actually have this in your /etc/sudoers - Run `sudo visudo` to check)
    # #includedir /etc/sudoers.d

    # This file assumes your deployment user is `deploy`

    # Nginx Commands
    Cmnd_Alias NGINX_RESTART = /usr/sbin/service nginx restart
    Cmnd_Alias NGINX_RELOAD = /usr/sbin/service nginx reload

    # No-Password Commands
    deploy ALL=NOPASSWD: NGINX_RESTART, NGINX_RELOAD