I'm setting up an image for a webserver. I have a script on the server that fetches the latest source code for an application from a repository and does all the configuration necessary for deployment. This script is to be run by the unprivileged user for deployment.
1. System boots
2. Apache starts
3. I log in, run my script, and restart apache
What I want:
1. System boots, starting all services *except* apache
2. my script runs, with only the permission of the 'deployment' user
3. start the apache services
I haven't really been following upstart or how it works at all. I see apache still starts from System V-style init scripts. What's the right way to set this up cleanly?