echo off
set nginx_home=D:\download\nginx-1.5.4
cd %nginx_home%
tasklist | findstr /i "nginx.exe"
if %ERRORLEVEL% == 0 (
goto :stop_nginx
goto :start_nginx
goto :eof
) else (
goto :start_nginx
goto :eof
)
:stop_nginx
echo "nginx is running, stopping..."
rem nginx -s stop
TASKKILL /F /IM nginx.exe /T
echo "stop ok"
:start_nginx
echo "nginx is not running, starting"
start "" nginx.exe
echo "start ok"
windows 下nginx启动停止的bat脚本
最新推荐文章于 2024-04-24 08:40:45 发布