On Friday, October 11, 2013 7:18:04 AM UTC-7, Carlos Cesar Caballero Díaz wrote: > > Hi, sometimes I need to deploy aplications to run locally and I write > this bash script for linux PCs that help to run a web2py application > like a desktop one, starting the web2py app in a browser, and killing > the web2py process when the browser is closed: > > #!/bin/bash > WEB2PY_PORT="2024" > WEB2PY_PID_FILE="/tmp/we2py_pid" > WEB2PY_PASSWORD="password" > WEB2PY_APP="bdgie" > WEB2PY_PATH="/path/web2py.py" > > python $WEB2PY_PATH -a $WEB2PY_PASSWORD -p $WEB2PY_PORT -d > $WEB2PY_PID_FILE & # start web2py in background > sleep 5 # wait 5 seconds while server starts > sensible-browser http://localhost:$WEB2PY_PORT/$WEB2PY_APP # open > web browser with app URL and wait to close > web2py_pid=`cat $WEB2PY_PID_FILE` # get web2py process id > kill -SIGTERM $web2py_pid # kill web2py > > Now I need do the same in a windows PC, but my batch scripting is not > good, so, before I start banging my head against the batch rock, someone > has done something like this?. > Any tip will be very useful. > > On Windows, the default "shell" is cmd.exe, and I don't think it has a built-in sleep command or a kill command. You may need to be using Power Shell, but I'm afraid I can't give any details about that. I think it comes standard on Win Server 2008. And I think there are some Power Shell users that post in this group, so you may not have to wait long for real advice.
/dps -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

