rem -- http://www.upupw.net
rem -- webmaster@upupw.net
set kangle_vc=kangle
set database_vc=UPUPW_Database_K
set updaemon_vc=UPUPW_UPDaemon_K
set mem_vc=UPUPW_MemCached_K
set fzftp_vc=FileZilla Server
set kangle_port=80
set ftp_port=21
set web_port=3388
set database_port=3306
set mem_ip=127.0.0.1
set mem_port=11211
set mem_memory=256
set mem_connect=1920
set kangle_system=true
set webhost=upupw.net
for /d %%d in (*) do (
if exist %%d\upcore.exe set upcore_dir=%%d
if exist %%d\bin\kangle.exe set kangle_dir=%%d&& set kangle_exe=kangle.exe
if exist %%d\PX.exe set phpx_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
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 "%kangle_dir%"=="" echo # Kangle Not Found. & pause & exit /b
if "%phpx_dir%"=="" echo # PHPX Not Found. & pause & exit /b
if "%database_dir%"=="" echo # MySQL/MariaDB Not Found. & pause & exit /b
if "%mem_dir%"=="" echo # memcached 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
set vhosts_conf=%kangle_dir%\etc\config.xml
set upcore=%upcore_dir%
set upd_config=%upcore_dir%\upd_config.cmd
set php52_dir=%phpx_dir%\PHP52
set php53_dir=%phpx_dir%\PHP53
set php54_dir=%phpx_dir%\PHP54
set php55_dir=%phpx_dir%\PHP55
set php56_dir=%phpx_dir%\PHP56
set php70_dir=%phpx_dir%\PHP70
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
set cacls=%Sys32%\cacls.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 %cacls% echo   # 缺少 %cacls%, 无法进行. & %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=
