I'm trying to build a Jenkins job that (1) pulls the latest from Git
, (2) builds my Django
project, and (3) restarts gunicorn
and nginx
.
However, when I try to restart gunicorn
, I get the following error:
jenkins@digitalocean:/$ /usr/sbin/service gunicorn restart
Failed to restart gunicorn.service: Access denied
I think this is because the user jenkins
doesn't have access to gunicorn.service
? What are some strategies I can use to handle this?