Skip to content

Instantly share code, notes, and snippets.

Last active May 8, 2017
What would you like to do?
Nginx on Windows
@echo off
pushd "%~dp0"
cd ..
if "%*" == "" (
tasklist /fi "ImageName eq nginx.exe" |find "nginx.exe" >nul
if errorlevel 1 (
start /b nginx.exe
) else (
echo nginx.exe is already running. Nothing todoy.
) else if "%*" == "-l" (
tasklist /fi "ImageName eq nginx.exe"
) else call nginx.exe %*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment