上传代码

This commit is contained in:
liwei 2023-02-06 18:26:35 +08:00
parent 31123deeea
commit b8ee038b59
18 changed files with 51 additions and 66 deletions

3
.gitignore vendored
View File

@ -10,4 +10,5 @@
*.out *.out
*.log *.log
/output /output
/publish

BIN
obj/Debug/net6.0/apphost Executable file

Binary file not shown.

View File

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("dfbattle")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("dfbattle")]
[assembly: System.Reflection.AssemblyTitleAttribute("dfbattle")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -0,0 +1 @@
1c0b81c852e44cc253216ba4ce98894e13df5491

View File

@ -7,4 +7,4 @@ build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly = build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = dfbattle build_property.RootNamespace = dfbattle
build_property.ProjectDir = f:\work\c#\dfbattle\ build_property.ProjectDir = /home/liwei/dfbattle/

View File

@ -0,0 +1 @@
a9f6a2cbd6919dfe98486fa4701a25b8e100cc87

View File

@ -21,3 +21,26 @@ F:/work/c#/dfbattle/obj/Debug/net6.0/refint/dfbattle.dll
F:/work/c#/dfbattle/obj/Debug/net6.0/dfbattle.pdb F:/work/c#/dfbattle/obj/Debug/net6.0/dfbattle.pdb
F:/work/c#/dfbattle/obj/Debug/net6.0/dfbattle.genruntimeconfig.cache F:/work/c#/dfbattle/obj/Debug/net6.0/dfbattle.genruntimeconfig.cache
F:/work/c#/dfbattle/obj/Debug/net6.0/ref/dfbattle.dll F:/work/c#/dfbattle/obj/Debug/net6.0/ref/dfbattle.dll
/home/liwei/dfbattle/output/dfbattle
/home/liwei/dfbattle/output/dfbattle.deps.json
/home/liwei/dfbattle/output/dfbattle.runtimeconfig.json
/home/liwei/dfbattle/output/dfbattle.dll
/home/liwei/dfbattle/output/dfbattle.pdb
/home/liwei/dfbattle/output/Fleck.dll
/home/liwei/dfbattle/output/Microsoft.Extensions.DependencyInjection.dll
/home/liwei/dfbattle/output/Microsoft.Extensions.DependencyInjection.Abstractions.dll
/home/liwei/dfbattle/output/battle.dll
/home/liwei/dfbattle/output/FightRunner.dll
/home/liwei/dfbattle/output/GameFight.dll
/home/liwei/dfbattle/output/GameProto.dll
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.csproj.AssemblyReference.cache
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.GeneratedMSBuildEditorConfig.editorconfig
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.AssemblyInfoInputs.cache
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.AssemblyInfo.cs
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.csproj.CoreCompileInputs.cache
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.csproj.CopyComplete
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.dll
/home/liwei/dfbattle/obj/Debug/net6.0/refint/dfbattle.dll
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.pdb
/home/liwei/dfbattle/obj/Debug/net6.0/dfbattle.genruntimeconfig.cache
/home/liwei/dfbattle/obj/Debug/net6.0/ref/dfbattle.dll

Binary file not shown.

View File

@ -0,0 +1 @@
ce008eecd25694de187e069485ceb927ba88ca04

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
./stup.sh start dfbattle.dll
sleep 1
exit

View File

@ -1 +0,0 @@
./stup.sh stop dfbattle.dll

60
stup.sh
View File

@ -1,60 +0,0 @@
#!/bin/sh
SERVICE=$2
CMD="dotnet $2"
start(){
echo "starting $SERVICE..."
num=`ps -ef | grep dotnet | grep $SERVICE | grep -v grep | grep -v /bin/bash | wc -l`
if [ $num -eq 0 ]
then
# nohup $CMD > /dev/null 2>&1 &
nohup $CMD > $SERVICE.log 2>&1 &
if [ $? -ne 0 ]
then
echo "start failed, please check the log!"
exit $?
else
# echo $! > $SERVICE.pid
echo "start success"
fi
else
echo "$SERVICE is already running"
fi
}
stop(){
echo "stopping $SERVICE..."
#kill -9 `cat $SERVICE.pid`
kill -9 `ps -ef | grep dotnet | grep $SERVICE | awk '{print $2}'`
if [ $? -ne 0 ]
then
echo "stop failed, may be $SERVICE isn't running"
exit $?
else
#rm -rf $SERVICE.pid
echo "stop success"
fi
}
restart(){
stop&&start
}
status(){
num=`ps -ef | grep dotnet | grep $SERVICE | grep -v grep | wc -l`
if [ $num -eq 0 ]
then
echo "$SERVICE isn't running"
else
echo "$SERVICE is running"
fi
}
case $1 in
start) start ;;
stop) stop ;;
restart) restart ;;
status) status ;;
*) echo "Usage: $0 {start|stop|restart|status}" ;;
esac
exit 0