Add back whitespace at end of sre-save.c
[mono-project.git] / scripts / mono-service.in
blob539074b7154010a487821eb382abb4da33a83b4e
1 #!/bin/sh
2 args=""
3 assembly=
4 debug=false
5 while test x$1 != x; do
6 case $1 in
7 -[ldnm]:*) args="$args$1 " ;;
8 --debug) debug=true ;;
9 --no-daemon) debug=true ;;
10 *) assembly=$1; args="$args$assembly ";;
11 esac
12 shift
13 done
15 if test x$assembly = x; then
16 echo You must specify at least the assembly name
17 echo
18 echo "Usage is: $0 [options] service"
19 echo
20 echo ' -d:<directory> Working directory'
21 echo ' -l:<lock file> Lock file (default is /tmp/<service>.lock)'
22 echo ' -m:<syslog name> Name to show in syslog'
23 echo ' -n:<service name> Name of service to start (default is first defined)'
24 echo ' --debug Do not send to background nor redirect input/output'
25 echo ' --no-daemon Do not send to background nor redirect input/output'
26 echo
27 echo Controlling the service:
28 echo
29 echo ' kill -USR1 `cat <lock file>` Pausing service'
30 echo ' kill -USR2 `cat <lock file>` Continuing service'
31 echo ' kill `cat <lock file>` Ending service'
32 echo
33 exit 1
36 if $debug; then
37 exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/@framework_version@/mono-service.exe $args
38 else
39 exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/@framework_version@/mono-service.exe $args </dev/null >/dev/null 2>&1 &