1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
.TH starting 7 2009-07-09 "Upstart"
.\"
.SH NAME
starting \- event signalling that a job is starting
.\"
.SH SYNOPSIS
.B starting
.BI JOB\fR= JOB
.BI INSTANCE\fR= INSTANCE
.RI [ ENV ]...
.\"
.SH DESCRIPTION
The
.B starting
event is generated by the Upstart
.BR init (8)
daemon when a new instance of a job begins starting. The
.B JOB
environment variable contains the job name, and the
.B INSTANCE
environment variable contains the instance name which will be empty for
single-instance jobs.
.BR init (8)
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
.BR stopped (7)
event by services.
Job configuration files may use the
.B export
stanza to export environment variables from their own environment into
the
.B starting
event. See
.BR init (5)
for more details.
.\"
.SH EXAMPLE
A service that wishes to be running whenever another service would be
running, started before and stopped after it, might use:
.RS
.nf
start on starting apache
stop on stopped apache
.fi
.RE
A task that must be run before another task or service is started might
use:
.RS
.nf
start on starting postgresql
.fi
.RE
.\"
.SH SEE ALSO
.BR started (7)
.BR stopping (7)
.BR stopped (7)
.BR init (5)
|