🔖 bat script for nginx
parent
60dcfff522
commit
8b7d89b0b9
|
@ -1,3 +1,17 @@
|
||||||
@echo off
|
@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
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem 如果启动前已经启动nginx并记录下pid文件,会kill指定进程
|
|
||||||
nginx.exe -s stop
|
nginx.exe -s stop
|
||||||
pause
|
|
Loading…
Reference in New Issue