ZK_Framework/HybridCLRData/LocalIl2CppData-WindowsEditor/MonoBleedingEdge/bin/mono-service2

41 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-07-04 20:18:43 +08:00
#!/bin/sh
args=""
assembly=
debug=false
while test x$1 != x; do
case $1 in
-[ldnm]:*) args="$args$1 " ;;
--debug) debug=true ;;
--no-daemon) debug=true ;;
*) assembly=$1; args="$args$assembly ";;
esac
shift
done
if test x$assembly = x; then
echo You must specify at least the assembly name
echo
echo "Usage is: $0 [options] service"
echo
echo ' -d:<directory> Working directory'
echo ' -l:<lock file> Lock file (default is /tmp/<service>.lock)'
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 ' kill -USR1 `cat <lock file>` Pausing service'
echo ' kill -USR2 `cat <lock file>` Continuing service'
echo ' kill `cat <lock file>` Ending service'
echo
exit 1
fi
if $debug; then
exec /Users/bokken/build/output/Unity-Technologies/mono/tmp/bin/mono $MONO_OPTIONS /Users/bokken/build/output/Unity-Technologies/mono/tmp/lib/mono/4.5/mono-service.exe $args
else
exec /Users/bokken/build/output/Unity-Technologies/mono/tmp/bin/mono $MONO_OPTIONS /Users/bokken/build/output/Unity-Technologies/mono/tmp/lib/mono/4.5/mono-service.exe $args </dev/null >/dev/null 2>&1 &
fi