rem -- http://www.upupw.net
rem -- webmaster@upupw.net
set apache_vc=UPUPW_Apache
set database_vc=UPUPW_Database_A
set updaemon_vc=UPUPW_updaemon_A
set mem_vc=UPUPW_MemCached_A
set rds_vc=UPUPW_Redis_A
set fzftp_vc=UPUPW_FileZilla_A
set apache_port=80
set ssl_port=443
set ftp_port=21
set database_port=9900
set rds_port=6379
set mem_ip=127.0.0.1
set mem_port=11211
set mem_memory=256
set mem_connect=1920
set bit=32
for /d %%d in (*) do (
 if exist %%d\upcore.exe set upcore_dir=%%d
 if exist %%d\bin\httpd.exe set apache_dir=%%d&& set apache_exe=httpd.exe
 if exist %%d\php.exe set php_dir=%%d
 if exist %%d\bin\mysqld.exe set database_dir=%%d&& set database_exe=mysqld.exe
 if exist %%d\memcached.exe set mem_dir=%%d&& set mem_exe=memcached.exe
if exist %%d\redis-server.exe set rds_dir=%%d&& set rds_exe=redis-server.exe
 if exist %%d\guard.exe set guard_dir=%%d
 if exist "%%d\FileZilla_server.exe" set fz_dir=%%d&& set "fz_exe=FileZilla_server.exe"
)
if "%upcore_dir%"=="" echo # upcore Not Found. & pause & exit /b
if "%apache_dir%"=="" echo # Apache Not Found. & pause & exit /b
if "%php_dir%"=="" echo # PHP Not Found. & pause & exit /b
if "%database_dir%"=="" echo # Database Not Found. & pause & exit /b
if "%mem_dir%"=="" echo # Memcached Not Found. & pause & exit /b
if "%rds_dir%"=="" echo # Redis Not Found. & pause & exit /b
if "%guard_dir%"=="" echo # Guard Not Found. & pause & exit /b
set php=%upcore_dir%\upcore.exe -d extension_dir=%upcore_dir% -d date.timezone=UTC -n %upcore_dir%\up.dll
set pause=%php% echo `- 请按任意键继续...`; ^&^& pause^>nul 2>nul
set vhosts_conf=%apache_dir%\conf\httpd-vhosts.conf
set vhosts_conf_ssl=%apache_dir%\conf\httpd-vhosts-ssl.conf
set redis_conf=%rds_dir%\redis-service.conf
set upcore=%upcore_dir%
set upd_config=%upcore_dir%\upd_config.cmd
set cfg_bak_zip=Backup\cfg_bak.zip
set cfg_sckf_zip=Backup\cfg_sckf.zip
set cfg_xnsp_zip=Backup\cfg_xnsp.zip
set Sys32=%SystemRoot%\system32
set Path=%Sys32%;%Sys32%\wbem;%SystemRoot%
set net=%Sys32%\net.exe
set sc=%Sys32%\sc.exe
set taskkill=%Sys32%\taskkill.exe
set tasklist=%Sys32%\tasklist.exe
set findstr=%Sys32%\findstr.exe
if not exist %taskkill% echo   # 缺少 %taskkill%, 无法进行. & %pause%
if not exist %tasklist% echo   # 缺少 %tasklist%, 无法进行. & %pause%
if not exist %findstr% echo   # 缺少 %findstr%, 无法进行. & %pause%
if not exist %sc% echo   # 缺少 %sc%, 无法进行. & %pause%
if not exist %net% set net=%Sys32%\net1.exe
if not exist %net% echo  # 缺少 %Sys32%\net.exe, 不可继续. &%pause%&set php=&exit /b
%php% "chk_path(getcwd());" || %pause% && set php=
