@echo off
rem 當前bat的作用
echo ***************===begin********************====
cls
set nginx_path=s:
set nginx_dir=s:\nginx-rtmp\nginx-1.10.1\
color 0a
title nginx 管理程式 power by ants (
cls
echo.
echo. * * nginx 管理程式 power by ants ( *
echo. * update by 鑫哥 2013-03-13 *
echo.
:menu
echo. * nginx 程序list *
tasklist|findstr /i "nginx.exe"
if errorlevel 1 (echo nginx.exe不存在) else (echo nginx.exe存在)
echo.
echo. [1] 啟動nginx
echo. [2] 關閉nginx
echo. [3] 重啟nginx
echo. [4] 退 出
echo.
echo.請輸入選擇專案的序號:
set /p id=
if "%id%"=="1" goto start
if "%id%"=="2" goto stop
if "%id%"=="3" goto restart
if "%id%"=="4" exit
pause
:start
call :startnginx
goto menu
:stop
call :shutdownnginx
goto menu
:restart
call :shutdownnginx
call :startnginx
goto menu
:shutdownnginx
echo.
echo.關閉nginx......
taskkill /f /im nginx.exe > nul
echo.ok,關閉所有nginx 程序
goto :eof
:startnginx
echo.
echo.啟動nginx......
if not exist "%nginx_dir%nginx.exe" echo "%nginx_dir%nginx.exe"不存在
%nginx_path%
cd "%nginx_dir%"
if exist "%nginx_dir%nginx.exe" (
echo "start '' nginx.exe"
start "" nginx.exe
) echo.ok
goto :eof
Nginx啟動指令碼
nginx啟動指令碼 nginx engine x 是乙個高效能的http和反向 伺服器,也是乙個 imap pop3 smtp 伺服器。因穩定性 豐富的功能 低資源消耗而聞名。但nginx本身不自帶啟動指令碼,需要我們手動編寫乙份,現在網上所提供的大多數指令碼都是有針對行的,可移植性很差。大多數這...
Nginx啟動指令碼
nginx啟動指令碼 nginx engine x 是乙個高效能的http和反向 伺服器,也是乙個 imap pop3 smtp 伺服器。因穩定性 豐富的功能 低資源消耗而聞名。但nginx本身不自帶啟動指令碼,需要我們手動編寫乙份,現在網上所提供的大多數指令碼都是有針對行的,可移植性很差。大多數這...
nginx 啟動指令碼
相信好多小夥伴啟動nginx和重啟的時候都需要在命令列輸入命令,本著程式猿封裝思想 咱們可以寫好指令碼這樣就一勞永逸了。echo off cd d d nginx 1.5.1 這是nginx的安裝路徑 start nginx.exe exit echo off d cd d nginx 1.5.1 ...