Skip to content

Commit

Permalink
fix generated upgrade bash script. (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingluoHuang authored and bryanmacfarlane committed Jun 13, 2016
1 parent 07ac961 commit b8fff64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Agent.Listener/SelfUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ private string GenerateBatchScript(string latestAgent, bool restartInteractiveAg
scriptBuilder.AppendLine("endlocal");
}

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

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

scriptBuilder.AppendLine("echo \"Exit _update.sh\" >> \"$logfile\" 2>&1");

string updateScript = Path.Combine(IOUtil.GetWorkPath(HostContext), "_update.sh");
if (File.Exists(updateScript))
{
Expand Down

0 comments on commit b8fff64

Please sign in to comment.