Update man page
[mono.git] / man / mono-service.1
1 .\" 
2 .\" mono-service manual page.
3 .\" (C) 2005 Novell, Inc. 
4 .\" Author:
5 .\"   Miguel de Icaza (miguel@gnu.org)
6 .\"
7 .de Sp \" Vertical space (when we can't use .PP)
8 .if t .sp .5v
9 .if n .sp
10 ..
11 .TH Mono "Mono 1.0"
12 .SH NAME
13 mono-service \- Mono ServiceProcess host
14 .SH SYNOPSIS
15 .PP
16 .B mono-service [options] program.exe
17 .SH DESCRIPTION
18 The \fImono-service\fP is a host to run services built with the
19 ServiceProcess assembly.
20 .PP
21 Services can be paused by sending the SIGUSR1 signal to the process,
22 and execution can be resumed by sending the SIGUSR2 signal.   The
23 service can be cleanly shutdown by sending the SIGTERM signal to the
24 process. 
25 .PP
26 Mono programs started with mono-service run with the 
27 .B MONO_DISABLE_SHM
28 variable set.    This means that certain Mono features that depend on
29 it are not available to services.
30 .PP
31 The following options can be used to control the service:
32 .TP
33 .I "-d:DIRECTORY"
34 Use this option to specify the working directory for the service.  The
35 default is the current directory. 
36 .TP
37 .I "-l:LOCKFILE"
38 Specifies the file to use for locking, the default is a filename
39 constructed in /tmp based on the name of the program that hosts the
40 service. 
41 .TP
42 .I "-m:MESSAGE"
43 Name to show in the syslog.
44 .TP
45 .I "-n:NAME"
46 Use this to specify the service to be launched (if the program
47 contains more than one service).   The default is to run the first
48 defined service.
49 .TP
50 .I "--debug"
51 Use this option to prevent mono-service from redirecting stdin and
52 stdout and prevent the program to be sent to the background.
53 Equivalent to --no-daemon
54 .TP
55 .I "--no-daemon"
56 Use this option to prevent mono-service from redirecting stdin and
57 stdout and prevent the program to be sent to the background.
58 Equivalent to --debug.
59 .SH CONTROL
60 You can control the service by sending signals to the process, you can
61 use the following commands:
62 .TP
63 Pausing service:
64 .nf
65         kill -USR1 `cat <lock file>`
66 .fi
67 .TP
68 Resuming service:
69 .nf
70         kill -USR2 `cat <lock file>`
71 .fi
72 .TP
73 Stopping the service:
74 .nf
75         kill `cat <lock file>`
76 .fi
77 .SH EXAMPLES
78 Start the MyService.exe assembly, with a lock in /root/service-lock:
79 .nf
80
81         mono-service -l:/root/service-lock MyService.exe
82
83 .fi
84 .SH DEBUGGING
85 Messages produced by the service are logged on syslog.
86 .SH MAILING LISTS
87 Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
88 .SH WEB SITE
89 Visit: http://www.mono-project.com for details
90 .SH SEE ALSO
91 .BR mono(1)
92 .PP
93 .BR N:System.ServiceProcess
94