From fcf908fa5570193bd26e9643dc63b72542bc3170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Tue, 3 Dec 2024 08:33:00 +0800 Subject: [PATCH] v3.2.2024.1203 --- ClientTest/ClientTest.csproj | 2 +- StarAgent/Program.cs | 13 ++++++++++++- StarAgent/StarAgent.csproj | 2 +- Stardust.Server/Stardust.Server.csproj | 2 +- Stardust.Web/Stardust.Web.csproj | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ClientTest/ClientTest.csproj b/ClientTest/ClientTest.csproj index 035f7266..7ed72682 100644 --- a/ClientTest/ClientTest.csproj +++ b/ClientTest/ClientTest.csproj @@ -21,7 +21,7 @@ - + diff --git a/StarAgent/Program.cs b/StarAgent/Program.cs index 7367a57d..1048e2ac 100644 --- a/StarAgent/Program.cs +++ b/StarAgent/Program.cs @@ -2,6 +2,7 @@ using System.Reflection; using NewLife; using NewLife.Agent; +using NewLife.Agent.Models; using NewLife.Log; using NewLife.Model; using NewLife.Reflection; @@ -14,6 +15,7 @@ using Stardust.Models; using Stardust.Plugins; using IHost = NewLife.Agent.IHost; +using ServiceModel = NewLife.Agent.Models.ServiceModel; namespace StarAgent; @@ -180,7 +182,16 @@ private void FixKillMode(SystemdSetting set) exe = dll; } - Host.Install(ServiceName, DisplayName, exe, "-s", Description); + var service = new ServiceModel + { + ServiceName = ServiceName, + DisplayName = DisplayName, + Description = Description, + FileName = exe, + Arguments = "-s", + }; + + Host.Install(service); } } } diff --git a/StarAgent/StarAgent.csproj b/StarAgent/StarAgent.csproj index d2127592..6e30a60e 100644 --- a/StarAgent/StarAgent.csproj +++ b/StarAgent/StarAgent.csproj @@ -47,7 +47,7 @@ - + diff --git a/Stardust.Server/Stardust.Server.csproj b/Stardust.Server/Stardust.Server.csproj index 0db73667..1377a782 100644 --- a/Stardust.Server/Stardust.Server.csproj +++ b/Stardust.Server/Stardust.Server.csproj @@ -45,7 +45,7 @@ - + diff --git a/Stardust.Web/Stardust.Web.csproj b/Stardust.Web/Stardust.Web.csproj index 8d00271c..e9da1971 100644 --- a/Stardust.Web/Stardust.Web.csproj +++ b/Stardust.Web/Stardust.Web.csproj @@ -52,7 +52,7 @@ - +