diff --git a/.gitignore b/.gitignore index 5056c71..a69330a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1 @@ -upstart-0.6.6.tar.gz -/initjobs-20101206.tar.gz -/upstart-0.6.7.tar.gz -/upstart-1.0.tar.gz -/upstart-1.1.tar.gz -/upstart-1.2.tar.gz -/initjobs-20110502.tar.gz +upstart-0.3.11.tar.bz2 diff --git a/dead.package b/dead.package deleted file mode 100644 index 7ceac32..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -This package was retired on 2012-08-06 due to no active maintainers for the package. diff --git a/events.5 b/events.5 new file mode 100644 index 0000000..d6e30b9 --- /dev/null +++ b/events.5 @@ -0,0 +1,286 @@ +.TH events 5 "April 2008" "Upstart" +.\" +.SH NAME +events \- format of event files used by the upstart init system +.\" +.SH DESCRIPTION +upstart works on the basis of \fBevent\fP files that describe jobs +that should be managed. This includes the particulars about what binary +or shell script code should executed while the job is running, and +which events can cause the job to be started or stopped. + +Event files are stored in the \fI/etc/event.d\fP directory. +.\" +.SH SYNTAX + +Event files can contain the following stanzaz. + +.TP +.BI "exec " +When the event is started by \fBinit\fR, execute the following arguments. + +Example: exec /bin/dbus-daemon --system + +.TP +.BI "script ..." +Like \fBexec\fR but instead of executing a single program, execute +the following shell code. \fBscript\fR sections are closed with a +\fBend script\fR marker. + +Example: +.nf + script + rm -f /var/run/sshd.pid + sshd + end script +.ni + +Only one of \fBexec\fR and \fBscript\fR can be used at a time. If both +are bspecifed, \fBexec\fR takes priority. + +.TP +.BI pre-start +Execute the command/script before actually starting the process. +\fBpre-start\fR can be invoked as \fBpre-start exec\fR or \fBpre-start script\fR +in the same way that a start action can be handled by either +\fBexec\fR or \fBscript\fR. + +.TP +.BI post-start +Execute the command/script after starting the process. +The format is similar to \fBpre-start\fR. + +.TP +.BI pre-stop +Execute the command/script before stopping the process. +The format is similar to \fBpre-start\fR. + +.TP +.BI post-stop +Execute the command/script after stopping the process. +The format is similar to \fBpre-start\fR. + +.TP +.BI "start on " +Describes on what condition to start this job. Without this +section, the job can only be manually started with the +\fBinitctl(8)\fR command. + +Examples: +.nf + start on startup + This starts immediately after boot. + + start on stopped rc3 + This starts when the 'rc3' event has stopped. +.ni + +Events are matched via globbing. So a stanza of the form +.nf + start on runlevel [2345] +.ni +would match any of runlevels 2, 3, 4, or 5. + +.TP +.BI "stop on " +Describes on what condition to stop this job. Without this +section, the job can only be manually stopped with the +\fBinitctl\fR command. + +Examples: +.nf + stop on runlevel 0 + This stops the job when runlevel 0 is entered. + + stop on stopping dbus ok + This stops the job when the 'dbus' job is stopped. +.ni + +Events are matched via globbing. So a stanza of the form +.nf + stop on runlevel [!5] +.ni +would match any runlevel other than 5. + +.TP +.BI daemon +Sets the daemon flag for the job. This means that the job will +fork in the background and that its PID needs to be obtained. + +.TP +.BI respawn +This sets the daemon, service, and respawn flags for the job. +The respawn flag means that the process will be restarted when +it ends. + +.TP +.BI "respawn limit [count [timeout]]" +This configures respawn limits. Respawn limits only apply +if the \fBrespawn\fR flag is set for the job; setting a limit +does not automatically set respawning capability. If the +process is respawned more than \fIcount\fR times within an +interval of \fItimeout\fR seconds, the job will be stopped +automatically, andn ot restarted. The limit defaults to 10 +times within 5 seconds. + +Example: respawn limit 10 120 + +This sets the limit for respawn to ten times within two +minutes, the historical behavior for System V init. + +.TP +.BI service +\fBservice\fR means that the job has reached its goal when running. +\fBservice\fR is implied by the \fBrespawn\fR flag. + +.TP +.BI instance +\fBinstance\fR means that the job starts new instances every time +it is started, even if there is another instance running. It +is the converse of \fBdaemon\fR. + +.TP +.BI "kill timeout