-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path1-Start.bat
37 lines (29 loc) · 901 Bytes
/
1-Start.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
set "ThisDir=%~dp0"
set "ThisDir=%ThisDir:~0,-1%"
echo Checking if already runing...
ping 127.0.0.1 -n 1 >nul 2>&1
taskkill /f /IM nginx.exe >nul 2>&1
taskkill /f /IM php-cgi.exe >nul 2>&1
taskkill /f /IM mariadbd.exe >nul 2>&1
echo Starting FastCGI...
pushd "%ThisDir%\php\php-8.0.0\"
start %ThisDir%\bins\RunHiddenConsole.exe php-cgi.exe -b 127.0.0.1:9123
popd
ping 127.0.0.1 -n 1 >nul 2>&1
qprocess "php-cgi.exe" >nul 2>&1
if %errorlevel% equ 0 echo FastCGI is now running.
echo Starting NGINX...
pushd "%ThisDir%\nginx\"
start nginx.exe
popd
ping 127.0.0.1 -n 1 >nul 2>&1
qprocess "nginx.exe" >nul 2>&1
if %errorlevel% equ 0 echo NGINX is now running.
echo Starting MySQL...
pushd "%ThisDir%\mariadb\bin\"
start %ThisDir%\bins\RunHiddenConsole.exe mariadbd.exe
popd
ping 127.0.0.1 -n 1 >nul 2>&1
qprocess "mariadbd.exe" >nul 2>&1
if %errorlevel% equ 0 echo MySQL is now running.