代码拉取完成,页面将自动刷新
同步操作将从 光宇开源/SmartPing 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
@echo off
title SmartPing
setlocal
set uac=~uac_permission_tmp_%random%
md "%SystemRoot%\system32\%uac%" 2>nul
if %errorlevel%==0 ( rd "%SystemRoot%\system32\%uac%" >nul 2>nul ) else (
echo set uac = CreateObject^("Shell.Application"^)>"%temp%\%uac%.vbs"
echo uac.ShellExecute "%~s0","","","runas",1 >>"%temp%\%uac%.vbs"
echo WScript.Quit >>"%temp%\%uac%.vbs"
"%temp%\%uac%.vbs" /f
del /f /q "%temp%\%uac%.vbs" & exit )
endlocal
:BG
echo
echo SmartPing
echo
echo
echo Instruction USE
echo build run go get and build
echo run run smartping
echo install install smartping as service (use nssm)
echo start start smartping service
echo stop stop smartping service
echo restart stop and start smartping
echo version show smartping version
echo
echo
%~d0
cd %~dp0
::SET select=
SET /P select="Please Enter Instructions:"
IF "%select%"=="build" (
go get -v ./...
go build -o %~dp0\bin\goping.exe %~dp0\src\ping\goping\goping.go
go build -o %~dp0\bin\smartping.exe %~dp0\src\smartping.go
echo Build Finish..
) ELSE (
IF "%select%"=="run" (
%~dp0/bin/smartping.exe
) ELSE (
IF "%select%"=="install" (
%~dp0\\bin\\nssm.exe install smartping %~dp0\\bin\\smartping.exe
) ELSE (
IF "%select%"=="start" (
net start smartping
) ELSE (
IF "%select%"=="stop" (
net stop smartping
) ELSE (
IF "%select%"=="restart" (
net stop smartping
net start smartping
) ELSE (
IF "%select%"=="uninstall" (
sc delete smartping
) ELSE (
IF "%select%"=="version" (
%~dp0\bin\smartping.exe -v
) ELSE (
echo Param Error Try Again!
pause
GOTO BG
)
)
)
)
)
)
)
)
pause
exit
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。