X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=scripts%2Fmono-service.in;h=f86087ec9c8c3e7425181222610fd173474c18fd;hb=c6d92b9983868483ec4b39b83341ffb413ad74d6;hp=950c2f66cb47d5eb1853fe3ae547e53a93b852d6;hpb=fd922aabc2d91034533599122535e3de85712b6c;p=mono.git diff --git a/scripts/mono-service.in b/scripts/mono-service.in index 950c2f66cb4..f86087ec9c8 100644 --- a/scripts/mono-service.in +++ b/scripts/mono-service.in @@ -1,13 +1,13 @@ #!/bin/sh -a=`which "$0"` -d=`dirname "$a"` - -args="$@" +args="" assembly= +debug=false while test x$1 != x; do case $1 in - -[ldnm]:*) ;; - *) assembly=$1;; + -[ldnm]:*) args="$args$1 " ;; + --debug) debug=true ;; + --no-daemon) debug=true ;; + *) assembly=$1; args="$args$assembly ";; esac shift done @@ -15,12 +15,14 @@ done if test x$assembly = x; then echo You must specify at least the assembly name echo - echo 'Usage is: mono-service [options] service' + echo "Usage is: $0 [options] service" echo echo ' -d: Working directory' - echo ' -l: Lock file (default is /tmp/.log)' + echo ' -l: Lock file (default is /tmp/.lock)' echo ' -m: Name to show in syslog' echo ' -n: Name of service to start (default is first defined)' + echo ' --debug Do not send to background nor redirect input/output' + echo ' --no-daemon Do not send to background nor redirect input/output' echo echo Controlling the service: echo @@ -32,4 +34,8 @@ if test x$assembly = x; then fi export MONO_DISABLE_SHM=1 -exec $d/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe $args & /dev/null & +if $debug; then + exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/@framework_version@/mono-service.exe $args +else + exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/@framework_version@/mono-service.exe $args /dev/null 2>&1 & +fi