Skip to content

Commit b8fff64

Browse files
TingluoHuangbryanmacfarlane
authored andcommitted
fix generated upgrade bash script. (#294)
1 parent 07ac961 commit b8fff64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Agent.Listener/SelfUpdater.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ private string GenerateBatchScript(string latestAgent, bool restartInteractiveAg
270270
scriptBuilder.AppendLine("endlocal");
271271
}
272272

273+
scriptBuilder.AppendLine("echo Exit _update.cmd >> %logfile% 2>&1");
273274
scriptBuilder.AppendLine(":end");
274275

275276
string updateScript = Path.Combine(IOUtil.GetWorkPath(HostContext), "_update.cmd");
@@ -363,9 +364,11 @@ private string GenerateShellScript(string latestAgent, bool restartInteractiveAg
363364
if (restartInteractiveAgent)
364365
{
365366
scriptBuilder.AppendLine("echo \"Restarting interactive agent\" >> \"$logfile\" 2>&1");
366-
scriptBuilder.AppendLine("\"$existingagentbinfolder\"/$agentprocessname");
367+
scriptBuilder.AppendLine("\"$existingagentbinfolder\"/$agentprocessname &");
367368
}
368369

370+
scriptBuilder.AppendLine("echo \"Exit _update.sh\" >> \"$logfile\" 2>&1");
371+
369372
string updateScript = Path.Combine(IOUtil.GetWorkPath(HostContext), "_update.sh");
370373
if (File.Exists(updateScript))
371374
{

0 commit comments

Comments
 (0)