@echo off
REM Run as Administrator. Stops nginx so win-acme can bind 443 (TLS-ALPN),
REM renews, then starts nginx again. Point the win-acme scheduled task here
REM instead of calling wacs.exe directly.
cd /d C:\tools\nginx-1.29.5
taskkill /F /IM nginx.exe >nul 2>&1
timeout /t 2 /nobreak >nul
cd /d C:\tools\win-acme
wacs.exe --renew --closeonfinish
cd /d C:\tools\nginx-1.29.5
start "" nginx.exe
