Instantly share code, notes, and snippets.

Embed
What would you like to do?
A batch script to detect network and auto restart iNode | 自动检测网络及重启 iNode 脚本
ping 114.114.114.114 | findstr TTL= && goto:networkup || goto :networkdown
:networkup
echo Network is up
goto :endofscript
:networkdown
echo Network is down
echo Restarting iNode...
taskkill /f /im "iNode Client.exe" /t
timeout 10
"C:\PROGRA~2\iNode\iNode Client\iNode Client.exe"
goto :endofscript
:endofscript
echo Script complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment