ngrok客户端挂掉,自动重启,并关闭有问题的窗口的脚本
作者:lcy 日期:2017-08-02
@echo off
:start
cls
C:\test\curl.exe -I http://www.baidu.com -o c:\test\curl.txt
echo %1|findstr "OK" curl.txt >nul
if %errorlevel% equ 0 (
echo ok
) else (
echo not ok
taskkill /f /FI "windowtitle eq 管理员: ngrok" /im cmd.exe
start StartNgrok.bat
)
ping /n 10 127.0.0.1 >nul
goto start
:start
cls
C:\test\curl.exe -I http://www.baidu.com -o c:\test\curl.txt
echo %1|findstr "OK" curl.txt >nul
if %errorlevel% equ 0 (
echo ok
) else (
echo not ok
taskkill /f /FI "windowtitle eq 管理员: ngrok" /im cmd.exe
start StartNgrok.bat
)
ping /n 10 127.0.0.1 >nul
goto start
评论: 0 | 引用: 0 | 查看次数: -
发表评论