Updated the initial startup time for Elasticsearch from 5 seconds to 30 seconds.

This commit is contained in:
Arturo Garcia 2017-03-05 08:45:08 -06:00
parent ef8fed0fd2
commit 448dbb007c

View File

@ -3,7 +3,7 @@ cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\elasticsearch-1.1.1.z
cmd /c ""C:\Program Files\elasticsearch-1.1.1\bin\service.bat" install"
sc config "elasticsearch-service-x64" start= auto
cmd /c ""C:\Program Files\elasticsearch-1.1.1\bin\service.bat" start"
powershell -Command "Start-Sleep -s 5"
powershell -Command "Start-Sleep -s 30"
powershell -Command "$req = [System.Net.HttpWebRequest]::Create('http://localhost:9200/metasploitable3/'); $req.method = 'PUT'; $req.GetResponse()"
powershell -Command "$body = [System.Text.Encoding]::ASCII.GetBytes('{\"user\":\"kimchy\", \"post_date\": \"2009-11-15T14:12:12\", \"message\": \"Elasticsearch\" }'); $req = [System.Net.HttpWebRequest]::Create('http://localhost:9200/metasploitable3/message/1'); $req.method = 'PUT'; $req.ContentType = 'application/x-www-form-urlencoded'; $stream = $req.GetRequestStream(); $stream.Write($body, 0, $body.Length); $stream.close(); $req.GetResponse()"