feat:添加生产脚本

main
邱棚 2025-03-17 12:20:38 +08:00
parent 1b25ca6721
commit 7f3b4c6ca3
3 changed files with 22 additions and 1 deletions

View File

@ -13,7 +13,9 @@
<ItemGroup>
<!-- 微软-主机构建扩展包 -->
<PackageReference Include="Autolabor.Robobase" Version="0.3.631" />
<PackageReference Include="Autolabor.Robobase" Version="0.3.631">
<ExcludeAssets>contentFiles</ExcludeAssets>
</PackageReference>
<PackageReference Include="Autolabor.Robobase.CodeGuard" Version="0.1.24">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@ -0,0 +1,12 @@
[Unit]
Description=Start Autolabor.Benz.Obstacle Service
After=multi-user.target
[Service]
User=autolabor
WorkingDirectory=/home/autolabor
ExecStart=/home/autolabor/app/Autolabor.Benz.ObstacleDetection/detection.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target

7
detection.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# 获取当前脚本所在目录的绝对路径
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "脚本当前目录:$SCRIPT_DIR"
mono "$SCRIPT_DIR"/bin/publish/BenzObstacleDetect.exe