Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #69 from xtreme-nitin-ravindran/develop
Browse files Browse the repository at this point in the history
Clear the consul agent PID file to allow for restart of the agent
  • Loading branch information
Genevieve VL authored May 16, 2017
2 parents 27962fa + a8b401b commit 1f0d4ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jobs/consul_agent_windows/templates/pre-start.ps1.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ function ReleaseDNSLock() {
Remove-Item C:\var\vcap\sys\run\consul-dns.lock -ErrorAction Ignore
}

function ClearConsulAgentPidfile() {
Remove-Item C:\var\vcap\sys\log\consul_agent_windows\consul_agent.pid -ErrorAction Ignore
}

ClearConsulAgentPidfile

WaitForDNSLock

[array]$routeable_interfaces = Get-WmiObject Win32_NetworkAdapterConfiguration | Where { $_.IpAddress -AND ($_.IpAddress | Where { $addr = [Net.IPAddress] $_; $addr.AddressFamily -eq "InterNetwork" -AND ($addr.address -BAND ([Net.IPAddress] "255.255.0.0").address) -ne ([Net.IPAddress] "169.254.0.0").address }) }
Expand Down

0 comments on commit 1f0d4ed

Please sign in to comment.