summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/toaster
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin/toaster')
-rwxr-xr-xbitbake/bin/toaster33
1 files changed, 18 insertions, 15 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index e82df9b80b..34a4e8f6f7 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -133,6 +133,22 @@ stop_system()
133 INSTOPSYSTEM=0 133 INSTOPSYSTEM=0
134} 134}
135 135
136start_bitbake() {
137 unset BBSERVER
138 bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0
139 if [ $? -ne 0 ]; then
140 echo "Bitbake server start failed"
141 return 1
142 fi
143 export BBSERVER=0.0.0.0:-1
144 export DATABASE_URL=`$BBBASEDIR/lib/toaster/manage.py get-dburl`
145 if [ $NOTOASTERUI -eq 0 ]; then # we start the TOASTERUI only if not inhibited
146 bitbake --observe-only -u toasterui --remote-server=$BBSERVER -t xmlrpc >>${BUILDDIR}/toaster_ui.log 2>&1 \
147 & echo $! >${BUILDDIR}/.toasterui.pid
148 fi
149 return 0
150}
151
136stop_bitbake() { 152stop_bitbake() {
137 BBSERVER=0.0.0.0:-1 bitbake -m 153 BBSERVER=0.0.0.0:-1 bitbake -m
138 unset BBSERVER 154 unset BBSERVER
@@ -324,28 +340,15 @@ fi
324 340
325case $CMD in 341case $CMD in
326 start ) 342 start )
327 start_success=1
328 addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE 343 addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE
329 echo > ${BUILDDIR}/conf/toaster-pre.conf 344 echo > ${BUILDDIR}/conf/toaster-pre.conf
330 if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then 345 if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
331 echo "Failed ${CMD}." 346 echo "Failed ${CMD}."
332 return 4 347 return 4
333 fi 348 fi
334 unset BBSERVER 349 start_bitbake
335 bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 350 if [ $? -eq 0 ]; then
336 if [ $? -ne 0 ]; then
337 start_success=0
338 echo "Bitbake server start failed"
339 else
340 export BBSERVER=0.0.0.0:-1
341 export DATABASE_URL=`$BBBASEDIR/lib/toaster/manage.py get-dburl`
342 if [ $NOTOASTERUI -eq 0 ]; then # we start the TOASTERUI only if not inhibited
343 bitbake --observe-only -u toasterui --remote-server=$BBSERVER -t xmlrpc >>${BUILDDIR}/toaster_ui.log 2>&1 \
344 & echo $! >${BUILDDIR}/.toasterui.pid
345 fi
346 python $BBBASEDIR/lib/toaster/manage.py runbuilds & echo $! >${BUILDDIR}/.runbuilds.pid 351 python $BBBASEDIR/lib/toaster/manage.py runbuilds & echo $! >${BUILDDIR}/.runbuilds.pid
347 fi
348 if [ $start_success -eq 1 ]; then
349 # set fail safe stop system on terminal exit 352 # set fail safe stop system on terminal exit
350 trap stop_system SIGHUP 353 trap stop_system SIGHUP
351 echo "Successful ${CMD}." 354 echo "Successful ${CMD}."