X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=scripts%2Fmono-service.in;h=f86087ec9c8c3e7425181222610fd173474c18fd;hb=HEAD;hp=25b789902c47f9701726dcd26f6bdb6f22510013;hpb=7e18ed47c9606f3981e7b18cbc238d6781843153;p=mono.git diff --git a/scripts/mono-service.in b/scripts/mono-service.in index 25b789902c4..f86087ec9c8 100644 --- a/scripts/mono-service.in +++ b/scripts/mono-service.in @@ -1,10 +1,13 @@ #!/bin/sh -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 @@ -12,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 @@ -29,4 +34,8 @@ if test x$assembly = x; then fi export MONO_DISABLE_SHM=1 -exec @bindir@/@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