Skip to content

Instantly share code, notes, and snippets.

@rwv
Created May 16, 2018 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwv/19a77f42bbaf5fa5811d0516ec2ff5ee to your computer and use it in GitHub Desktop.
Save rwv/19a77f42bbaf5fa5811d0516ec2ff5ee to your computer and use it in GitHub Desktop.
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