Merge pull request #5714 from alexischr/update_bockbuild
[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-service"
12 .SH NAME
13 mono-service, mono-service2 \- 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 Use \fImono-service\fP to run services that use the 1.0 assemblies and
22 use \fImono-service2\fP to run services that use the 2.0 assemblies.
23 .PP
24 Services can be paused by sending the SIGUSR1 signal to the process,
25 and execution can be resumed by sending the SIGUSR2 signal.   The
26 service can be cleanly shutdown by sending the SIGTERM signal to the
27 process. 
28 .PP
29 Mono programs started with mono-service run with the 
30 .B MONO_DISABLE_SHM
31 variable set.    This means that certain Mono features that depend on
32 it are not available to services.
33 .PP
34 The following options can be used to control the service:
35 .TP
36 .I "-d:DIRECTORY"
37 Use this option to specify the working directory for the service.  The
38 default is the current directory. 
39 .TP
40 .I "-l:LOCKFILE"
41 Specifies the file to use for locking, the default is a filename
42 constructed in /tmp based on the name of the program that hosts the
43 service. 
44 .TP
45 .I "-m:MESSAGE"
46 Name to show in the syslog.
47 .TP
48 .I "-n:NAME"
49 Use this to specify the service to be launched (if the program
50 contains more than one service).   The default is to run the first
51 defined service.
52 .TP
53 .I "--debug"
54 Use this option to prevent mono-service from redirecting stdin and
55 stdout and prevent the program to be sent to the background.
56 Equivalent to --no-daemon
57 .TP
58 .I "--no-daemon"
59 Use this option to prevent mono-service from redirecting stdin and
60 stdout and prevent the program to be sent to the background.
61 Equivalent to --debug.
62 .SH CONTROL
63 You can control the service by sending signals to the process, you can
64 use the following commands:
65 .TP
66 Pausing service:
67 .nf
68         kill -USR1 `cat <lock file>`
69 .fi
70 .TP
71 Resuming service:
72 .nf
73         kill -USR2 `cat <lock file>`
74 .fi
75 .TP
76 Stopping the service:
77 .nf
78         kill `cat <lock file>`
79 .fi
80 .SH EXAMPLES
81 Start the MyService.exe assembly, with a lock in /root/service-lock:
82 .nf
83
84         mono-service -l:/root/service-lock MyService.exe
85
86 .fi
87 .SH DEBUGGING
88 Messages produced by the service are logged on syslog.
89 .SH MAILING LISTS
90 Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
91 .SH WEB SITE
92 Visit: http://www.mono-project.com for details
93 .SH SEE ALSO
94 .BR mono(1)
95 .PP
96 .BR N:System.ServiceProcess
97