@echo off
@setlocal ENABLEDELAYEDEXPANSION
set CURDATE=%DATE%
set CURTIME=%TIME%
set Y=%CURDATE:~6,4%
set M=%CURDATE:~3,2%
set D=%CURDATE:~0,2%
set H=%CURTIME:~0,2%
set MIN=%CURTIME:~3,2%
set S=%CURTIME:~6,2%

set "var=OK"

for /f "delims=" %%i in ('\curl\bin\curl.exe 127.0.0.1:10380/ping^| find/i "%var%"') do set otvet_ok=%%i 



if defined otvet_ok (
	echo 10380 %Y% - %M% - %D% %H%:%MIN%:%S% >uspeh.txt
) ELSE (
   restkill.bat >restart_%M%_%D%_%H%%MIN%%S%.txt

)


