~jamesodhunt/ubuntu/raring/upstart/1.6

« back to all changes in this revision

Viewing changes to init/man/init.5

  • Committer: James Hunt
  • Date: 2011-12-14 14:09:46 UTC
  • mfrom: (1185.1.14 upstream)
  • Revision ID: james.hunt@ubuntu.com-20111214140946-omh0ikuf6utjdm1o
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
init \- Upstart init daemon job configuration
5
5
.\"
6
6
.SH SYNOPSIS
 
7
.TP
7
8
.B /etc/init/
8
 
 
 
9
Default location of system job configuration files.
 
10
.\"
 
11
.TP
9
12
.B $HOME/.init/
 
13
Default location of user job configuration files.
 
14
.RE
10
15
.\"
11
16
.SH DESCRIPTION
12
17
On startup, the Upstart
566
571
them yourself.
567
572
 
568
573
.TP
569
 
.B console output\fR|\fBowner
570
 
By default the standard input, output and error file descriptors of jobs
571
 
are connected to
572
 
.I /dev/null
573
 
 
574
 
If this stanza is specified, they are connected to
575
 
.I /dev/console
576
 
instead.
577
 
 
578
 
.B console owner
579
 
is special, it not only connects the job to the system console but sets
580
 
the job to be the owner of the system console, which means it will receive
581
 
certain signals from the kernel when special key combinations such as
582
 
Control\-C are pressed.
 
574
.B console \fBnone\fR|\fBlog\fR|\fBoutput\fR|\fBowner\fR
 
575
.\"
 
576
.RS
 
577
.B none
 
578
.RS
 
579
If \fBnone\fR is specified, the jobs standard input, standard output
 
580
and standard error file descriptors are connected to
 
581
.IR /dev/null "."
 
582
Any output generated by a job will be discarded.
 
583
This used to be the default prior to the introduction of \fBlog\fR in
 
584
Upstart 1.4.
 
585
.RE
 
586
.RE
 
587
.sp 1
 
588
.\"
 
589
.RS
 
590
.B log
 
591
.RS
 
592
.B
 
593
Only applies to system jobs:
 
594
if specified by user jobs, the job will be considered to have specified
 
595
the value
 
596
.BR none "."
 
597
 
 
598
For system jobs, if \fBlog\fR is specified, standard input is connected
 
599
to
 
600
.IR /dev/null ","
 
601
and standard output and standard error are connected to a pseudo-tty
 
602
which logs all job output.
 
603
 
 
604
Output is logged to file
 
605
.IR /var/log/upstart/<job-log-file> "."
 
606
If a job has specified \fBinstance\fR,
 
607
.I <job-log-file>
 
608
will equate to
 
609
.I <job>-<instance>.log
 
610
where \(aq<instance>\(aq is replaced by the specific instance value and
 
611
\(aq<job>\(aq is replaced with the job name (job configuration file
 
612
name, without the extension).  If \fBinstance\fR is not specified,
 
613
.I <job-log-file>
 
614
will be
 
615
.I <job>.log
 
616
where \(aq<job>\(aq is replaced with the job name.
 
617
 
 
618
If log files already exist, they are appended to.
 
619
 
 
620
All slash (\(aq/\(aq) characters in
 
621
.I <job-log-file>
 
622
are replaced with underscore (\(aq_\(aq) characters. For example,
 
623
any output from the \(aqwibble\(aq instance of the \(aqfoo/bar\(aq job
 
624
would be encoded in file \(aqfoo_bar-wibble.log\(aq in the log file
 
625
directory. This gives the log file directory a flat structure.
 
626
 
 
627
If the directory for system jobs does not exist, job output for each job
 
628
will be cached until the job finishes. Thus, the boot process
 
629
.B must
 
630
ensure that the directory is available as soon as possible since any job
 
631
that finishes before a writeable disk is available will not be able to
 
632
take advantage of this facility.
 
633
 
 
634
If it is not possible to write to any log file due to lack of disk
 
635
space, the job will be considered to have specified a
 
636
.B console
 
637
value of
 
638
.BR none
 
639
and all subsequent job output will be discarded.
 
640
 
 
641
Care should be taken if the log directory is a mount point since any job
 
642
that starts before that mount is available and which produces output will
 
643
then attempt to write logs to the mount point, not to the mounted
 
644
directory. This may give the impression that log data has not been
 
645
recorded. A strategy to handle this situation is to ensure the mount
 
646
point directory is not writeable such that logs will only be written
 
647
when the mount has succeeded (assuming the mount itself is writeable and
 
648
has sufficient space).
 
649
 
 
650
Note that since
 
651
.B log
 
652
utilizes pseudo-ttys, it may be necessary to increase the number of
 
653
available pty devices; see
 
654
.BR pty (7)
 
655
for details.
 
656
.RE
 
657
.RE
 
658
.sp 1
 
659
.\"
 
660
.RS
 
661
.B output
 
662
.RS
 
663
If \fBoutput\fR is specified, the standard input, standard output and
 
664
standard error file descriptors are connected to
 
665
.IR /dev/console "."
 
666
.RE
 
667
.RE
 
668
.sp 1
 
669
.\"
 
670
.RS
 
671
.B owner
 
672
.RS
 
673
The \fBowner\fR value is special: it not only connects the job to the
 
674
system console but sets the job to be the owner of the system console,
 
675
which means it will receive certain signals from the kernel when special
 
676
key combinations such as Control\-C are pressed.
 
677
.RE
 
678
.RE
583
679
.\"
584
680
.TP
585
681
.B umask \fIUMASK
659
755
.B unlimited
660
756
may be specified for either.
661
757
.\"
 
758
.TP
 
759
.B setuid \fIUSERNAME
 
760
Changes to the user
 
761
.I USERNAME
 
762
before running the job's process.
 
763
 
 
764
If this stanza is unspecified, the job will run as root in the case of
 
765
system jobs, and as the user in the case of User Jobs.
 
766
 
 
767
Note that System jobs using the setuid stanza are still system jobs,
 
768
and can not be controlled by an unprivileged user, even if the setuid
 
769
stanza specifies that user.
 
770
.\"
 
771
.TP
 
772
.B setgid \fIGROUPNAME
 
773
Changes to the group
 
774
.I GROUPNAME
 
775
before running the job's process.
 
776
 
 
777
If this stanza is unspecified, the primary group of the user specified
 
778
in the
 
779
.B setuid
 
780
block is used. If both stanzas are unspecified, the job will run with
 
781
its group ID set to 0 in the case of system jobs, and as the primary
 
782
group of the user in the case of User Jobs.
 
783
.\"
662
784
.SS Override File Handling
663
785
Override files allow a jobs environment to be changed without modifying
664
786
the jobs configuration file. Rules governing override files:
789
911
the condtion is satisfied.  Avoid using complex conditions with jobs
790
912
which need to be restarted.
791
913
.\"
 
914
.SH FILES
 
915
.
 
916
.TP
 
917
.I /etc/init/*.conf
 
918
System job configuration files.
 
919
.
 
920
.TP
 
921
.I /etc/init/*.override
 
922
System job override files.
 
923
.
 
924
.TP
 
925
.I $HOME/.init/*.conf
 
926
User job configuration files.
 
927
Note that you may make the directory
 
928
.I $HOME/.init/
 
929
a symbolic link to
 
930
.BR $HOME/.config/upstart/ "."
 
931
.
 
932
.TP
 
933
.I $HOME/.init/*.override
 
934
User job override files.
 
935
.
 
936
.TP
 
937
.I /var/log/upstart/*.log
 
938
Default location of system job output logs.
 
939
.RE
 
940
.\"
792
941
.SH AUTHOR
793
942
Manual page written by Scott James Remnant
794
943
.RB < scott@netsplit.com >
811
960
.BR initctl (8)
812
961
.BR sh (1)
813
962
.BR upstart-events (7)
 
963
.BR pty (7)