diff options
Diffstat (limited to 'bitbake/bin/toaster')
| -rwxr-xr-x | bitbake/bin/toaster | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index ce16de6c3b..2fabe5c8ec 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
| @@ -65,10 +65,10 @@ function webserverStartAll() | |||
| 65 | fi | 65 | fi |
| 66 | if [ "x$TOASTER_MANAGED" == "x1" ]; then | 66 | if [ "x$TOASTER_MANAGED" == "x1" ]; then |
| 67 | python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1 | 67 | python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1 |
| 68 | python $BBBASEDIR/lib/toaster/manage.py checksettings || retval=1 | 68 | python $BBBASEDIR/lib/toaster/manage.py checksettings --traceback || retval=1 |
| 69 | fi | 69 | fi |
| 70 | echo "Starting webserver" | ||
| 71 | if [ $retval -eq 0 ]; then | 70 | if [ $retval -eq 0 ]; then |
| 71 | echo "Starting webserver" | ||
| 72 | python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid | 72 | python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid |
| 73 | sleep 1 | 73 | sleep 1 |
| 74 | if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then | 74 | if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then |
| @@ -144,7 +144,10 @@ if [ -z "$ZSH_NAME" ] && [ `basename \"$0\"` = `basename \"$BASH_SOURCE\"` ]; th | |||
| 144 | } | 144 | } |
| 145 | TOASTER_MANAGED=1 | 145 | TOASTER_MANAGED=1 |
| 146 | export TOASTER_MANAGED=1 | 146 | export TOASTER_MANAGED=1 |
| 147 | webserverStartAll || (echo "Fail to start the web server, stopping" 1>&2 && exit 1) | 147 | if ! webserverStartAll; then |
| 148 | echo "Failed to start the web server, stopping" 1>&2; | ||
| 149 | exit 1; | ||
| 150 | fi | ||
| 148 | xdg-open http://0.0.0.0:8000/ >/dev/null 2>&1 & | 151 | xdg-open http://0.0.0.0:8000/ >/dev/null 2>&1 & |
| 149 | trap trap_ctrlc SIGINT | 152 | trap trap_ctrlc SIGINT |
| 150 | echo "Running. Stop with Ctrl-C" | 153 | echo "Running. Stop with Ctrl-C" |
