starting – event signalling that a job is starting
event is generated by the Upstart
daemon when a new instance of a job begins starting. The
environment variable contains the job name, and the
environment variable contains the instance name which will be empty for
will wait for all services started by this event to be running, all tasks
started by this event to have finished and all jobs stopped by this event
to be stopped before allowing the job to continue starting.
This allows jobs to effectively insert themselves as dependencies of
other jobs. The event is typically combined with the
event by services.
Job configuration files may use the
stanza to export environment variables from their own environment into
for more details.
A service that wishes to be running whenever another service would be
running, started before and stopped after it, might use:
start on starting apache
stop on stopped apache
A task that must be run before another task or service is started might
start on starting postgresql