Comment 5 for bug 1031035

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Here is an example snippet:

http://upstart.ubuntu.com/cookbook/#pre-start-example-ubuntu-specific
"""
pre-start script

  # stop job from continuing if no config file found for daemon
  [ ! -f /etc/default/myapp ] && { stop; exit 0; }

  # source the config file
  . /etc/default/myapp

  # stop job from continuing if admin has not enabled service in
  # config file.
  [ -z "$ENABLED" ] && { stop; exit 0; }

end script
"""

You will need to source the config file again to get the customized options.

If you implement the pre-start correctly, I'd be happy to sponsor this into Ubuntu.