I have a custom starting script that I can share:

@echo off

rem Some variables...
set PORT=8002
set pidfile=web2py.pid
set mycommand=web2py_no_console.exe
set adminpassword=your_password
set urltodisplay=http://127.0.0.1:%PORT%/

rem Restarting Web2Py?
if exist %pidfile% (
    echo Stopping currently running Web2py...
    call __STOP.cmd # killing it
)

rem Starting Web2Py ?
netstat -an | FINDSTR ":%PORT%" | FINDSTR LISTENING && ECHO . && ECHO Port 
%PORT% is already in use. Please change starting script and relaunch it. && 
start notepad %0 && Pause && EXIT 1

rem Starting Web2Py ?
start %mycommand% -i 0.0.0.0 -p %PORT% -a %adminpassword% -d %pidfile% -l 
web2py.log

rem Waiting then display page 
echo Server is starting, please wait...
ping -n 4 127.0.0.1 > NUL

rem launching page
start %urltodisplay%
echo If application is not starting, please visit %urltodisplay%
echo Otherwise feel free to close this window...
pause

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to