Restart supervisor without sudo password

If you want to restart the server via a script (e.g. Fabric), then you don't want to remember the password for sudo commands.One solution is this:

Edit the sudoers file like so:

$ sudo visudo 

And add this line:

michael ALL = NOPASSWD: /usr/local/bin/supervisorctl

Where michael is the user you want to give sudo without password rights for.