How do you automatically elevate an automatic task to root privileges or is there an alternative approach?

view full story

http://unix.stackexchange.com – I'm trying to write, in essence, an automatic deployment script for use by our development team and I know I can set up SSH to use keys so that I can automatically authenticate via key instead of password for the purposes of executing remote commands; however, what I'm stuck on is that the task that needs to execute for deployment requires us to restart an upstart job which requires root privileges. I've looked around on the internet (and here) and have been mostly unsuccessful and finding solutions. The question: Is there a way to remotely (and automatically, the script is not monitored so p (HowTos)