Skip to content

Commit 3700691

Browse files
committed
Fixed #375
1 parent 2b974b0 commit 3700691

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/ServiceControl/Hosting/Commands/RunCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public override void Execute(HostArguments args)
1010
{
1111
if (!Environment.UserInteractive)
1212
{
13-
using (var service = new Host())
13+
using (var service = new Host{ServiceName = args.ServiceName})
1414
{
1515
service.Run();
1616
}
@@ -20,6 +20,8 @@ public override void Execute(HostArguments args)
2020

2121
using (var service = new Host{ ServiceName = args.ServiceName} )
2222
{
23+
24+
2325
using (var waitHandle = new ManualResetEvent(false))
2426
{
2527
service.OnStopping = () =>

src/ServiceControl/Infrastructure/Nancy/Modules/RootModule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public RootModule()
5050
Get["/instance-info"] = p => Negotiate
5151
.WithModel(new
5252
{
53+
WindowsService = Settings.ServiceName,
5354
LogfilePath = Path.Combine(Settings.LogPath, "logfile.txt"),
5455
Settings.TransportType,
5556
})

src/ServiceControl/Infrastructure/Settings/Settings.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ static string DefaultLogPathForInstance()
162162
{
163163
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Particular\\ServiceControl\\logs");
164164
}
165-
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
166-
string.Format("Particular\\ServiceControl-{0}\\logs", ServiceName));
165+
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), string.Format("Particular\\{0}\\logs", ServiceName));
167166

168167
}
169168
}

0 commit comments

Comments
 (0)