start.bat
Código:
@echo off
diskw\home\admin\program\pskill.exe Apache.exe
IF NOT ERRORLEVEL 1 goto started
set Disk=%1
IF "%Disk%"=="" set Disk=w
rem create the disk
subst %Disk%: "diskw"
IF ERRORLEVEL 1 goto hint
set apachepath=\usr\local\apache2\
set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.
set programit=%Disk%:\home\admin\program\
set closeit=%programit%close.bat %Disk%
%Disk%:
cd \usr\local\php
start \usr\local\mysql\bin\mysqld-nt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf
CLS
echo The server is working on the disk %Disk%:\ [http/127.0.0.1/a/]
start %Disk%:\home\admin\WWW\redirect.html
start %programit%miniserv.exe "%apacheit%" "%closeit%"
goto end
:hint
CLS
echo The disk %Disk% is busy. Use start.bat [disk letter]
goto pause
:started
CLS
echo ERROR!!!
echo One of the instances of Apache server is started. Use stop.bat
:pause
echo .
pause
:end
stop.bat
Código:
@echo off
diskw\home\admin\program\pskill.exe mysqld-nt.exe c
diskw\home\admin\program\pskill.exe Apache.exe c
IF "%Disk%"=="" set Disk=w
subst "%Disk%": /D
startLoginServer.bat
Código:
@echo off
:start
echo Starting L2J Login Server.
echo.
java -Xmx128m -cp javolution.jar;c3p0-0.9.0.jar;mysql-connector-java-3.1.10-bin.jar;sqljdbc.jar;l2jserver.jar; net.sf.l2j.loginserver.LoginServer
if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:restart
echo.
echo Admin Restart ...
echo.
goto start
:error
echo.
echo Server terminated abnormaly
echo.
:end
echo.
echo server terminated
echo.
pause
startGameServer.bat
Código:
@echo off
:start
echo Starting L2J Game Server.
echo.
rem ======== Optimize memory settings =======
rem
rem 1GB: -Xmn128m -Xms512m -Xmx512m
rem 1.5GB: -Xmn192m -Xms768m -Xmx768m
rem 2GB: -Xmn256m -Xms1024m -Xmx1024m
rem
rem Make sure -Xmn value is always 1/4 the size of -Xms and -Xmx.
rem -Xms and -Xmx should always be equal.
rem ==========================================
java -Xmx512m -cp bsf.jar;bsh-2.0.jar;javolution.jar;c3p0-0.9.0.jar;mysql-connector-java-3.1.10-bin.jar;sqljdbc.jar;l2jserver.jar;jython.jar net.sf.l2j.gameserver.GameServer
if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:restart
echo.
echo Admin Restart ...
echo.
goto start
:error
echo.
echo Server terminated abnormaly
echo.
:end
echo.
echo server terminated
echo.
pause
Bueno, para alguien que sepa usar la shell bin bash debe ser facilisimo...pero yo no se xD....
Espero ayuditas