projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update known-issues
[mono.git]
/
scripts
/
mono-service.in
diff --git
a/scripts/mono-service.in
b/scripts/mono-service.in
index 25b789902c47f9701726dcd26f6bdb6f22510013..bd66b8722e773fd16ecd4e585ea7343ff1a74ff2 100644
(file)
--- a/
scripts/mono-service.in
+++ b/
scripts/mono-service.in
@@
-1,10
+1,13
@@
#!/bin/sh
#!/bin/sh
-args="
$@
"
+args=""
assembly=
assembly=
+debug=false
while test x$1 != x; do
case $1 in
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
esac
shift
done
@@
-12,12
+15,14
@@
done
if test x$assembly = x; then
echo You must specify at least the assembly name
echo
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:<directory> Working directory'
echo
echo ' -d:<directory> Working directory'
- echo ' -l:<lock file> Lock file (default is /tmp/<service>.lo
g
)'
+ echo ' -l:<lock file> Lock file (default is /tmp/<service>.lo
ck
)'
echo ' -m:<syslog name> Name to show in syslog'
echo ' -n:<service name> Name of service to start (default is first defined)'
echo ' -m:<syslog name> Name to show in syslog'
echo ' -n:<service name> 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
echo
echo Controlling the service:
echo
@@
-29,4
+34,8
@@
if test x$assembly = x; then
fi
export MONO_DISABLE_SHM=1
fi
export MONO_DISABLE_SHM=1
-exec @bindir@/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe $args </dev/null >& /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 >& /dev/null &
+fi