🔖 bat script for nginx

pull/2/head
Zhang Peng 2018-07-04 22:54:41 +08:00
parent 60dcfff522
commit 8b7d89b0b9
2 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,17 @@
@echo off
nginx.exe -c conf/nginx.conf
pause
rem 1. 如果目录不存在 logs 目录,则创建
if not exist %~dp0logs (
echo %~dp0logs is not exists, create it.
md %~dp0logs
)
rem 2. 如果目录不存在 temp 目录,则创建
if not exist %~dp0temp (
echo %~dp0temp is not exists, create it.
md %~dp0temp
)
rem 3. 指定 conf/nginx.conf ,启动 nginx
nginx.exe -t -c conf/nginx.conf
start nginx

View File

@ -1,4 +1,3 @@
@echo off
rem 如果启动前已经启动nginx并记录下pid文件会kill指定进程
nginx.exe -s stop
pause