2005-04-12 Dick Porter <dick@ximian.com>
[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 The following options can be used to control the service:
27 .TP
28 .I "-d:DIRECTORY"
29 Use this option to specify the working directory for the service.  The
30 default is the current directory. 
31 .TP
32 .I "-l:LOCKFILE"
33 Specifies the file to use for locking, the default is a filename
34 constructed in /tmp based on the name of the program that hosts the
35 service. 
36 .TP
37 .I "-m:MESSAGE"
38 Name to show in the syslog.
39 .TP
40 .I "-n:NAME"
41 Use this to specify the service to be launched (if the program
42 contains more than one service).   The default is to run the first
43 defined service.
44 .SH CONTROL
45 You can control the service by sending signals to the process, you can
46 use the following commands:
47 .TP
48 Pausing service:
49 .nf
50         kill -USR1 `cat <lock file>`
51 .fi
52 .TP
53 Resuming service:
54 .nf
55         kill -USR2 `cat <lock file>`
56 .fi
57 .TP
58 Stopping the service:
59 .nf
60         kill `cat <lock file>`
61 .fi
62 .SH EXAMPLES
63 Start the MyService.exe assembly, with a lock in /root/service-lock:
64 .nf
65
66         mono-service -l:/root/service-lock MyService.exe
67
68 .fi
69 .SH DEBUGGING
70 Messages produced by the service are logged on syslog.
71 .SH MAILING LISTS
72 Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
73 .SH WEB SITE
74 Visit: http://www.mono-project.com for details
75 .SH SEE ALSO
76 .BR mono(1)
77 .PP
78 .BR N:System.ServiceProcess
79