I am starting HA proxy using the following command:
sudo etc/init.d/haproxy start
and I stop HA proxy using:
sudo etc/init.d/haproxy stop
How can I write a basic upstart script for sudo etc/init.d/something start or stop ?
I'd probably reference the upstart documentation here - this example is based off one of the answers given for this question, adapting the other answers there nmay work as well. The example below should start haproxy without a PID, then have it running in the background.
I set it to start on boot, and then monitor with monit (http://mmonit.com/monit/). Haven't used upstart, but this works very well for me. :)