start populating the new System.Web.Configuration_2.0 dir
[mono.git] / scripts / mono-service.in
1 #!/bin/sh
2 a=`which "$0"`
3 d=`dirname "$a"`
4
5 args="$@"
6 assembly=
7 while test x$1 != x; do
8         case $1 in
9                 -[ldnm]:*) ;;
10                 *) assembly=$1;;
11         esac
12         shift
13 done
14
15 if test x$assembly = x; then
16         echo You must specify at least the assembly name
17         echo 
18         echo 'Usage is: mono-service [options] service'
19         echo 
20         echo '    -d:<directory>         Working directory'
21         echo '    -l:<lock file>         Lock file (default is /tmp/<service>.log)'
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 
25         echo Controlling the service:
26         echo 
27         echo '    kill -USR1 `cat <lock file>`    Pausing service'
28         echo '    kill -USR2 `cat <lock file>`    Continuing service'
29         echo '    kill `cat <lock file>`          Ending service'
30         echo 
31         exit 1
32 fi
33
34 export MONO_DISABLE_SHM=1
35 exec $d/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe $args </dev/null >& /dev/null &