UpstartThere are two major versions of Upstart in use right now. One is version 0.6.5: its used in CentOS / RHEL 6.x , and Ubuntu 10.04 LTS. The other is version 1.4 or newer: its used from Ubuntu 12.04 LTS and onward.
The following is censored version of an upstart script I assembled from online resources: Upstart Cookbook & UpstartHowto. The idea is to invoke a second script to do all the application work: the function of the startup script should be just that. But for security reasons, I need that script to run as a specific user. If its an older Ubuntu, or a RHEL/CentOS system, I could uncomment the "exec sudo" line (and I still haven't tested that on RHEL/CentOS atm). If its a newer Ubuntu, I can uncomment the "setuid" and "exec" line without sudo.
start on runlevel 
stop on runlevel [!2345]
#exec sudo -u proguser /opt/program/upstart.sh