I am new to HA Proxy and Upstart Scripting. I am using, HA Proxy version 1.4.18 2011/09/16. I am trying to write an upstart script that will keep haproxy alive in case haproxy dies. This is what I have so far:
script if [ $(pgrep haproxy) ]; then restart haproxy; else start haproxy; fi end script
Does look like a legible code?