[bitbake-devel] [PATCH 54/94] bitbake: webhob: clean up starting script
Alex DAMIAN
alexandru.damian at intel.com
Tue Sep 24 16:52:23 UTC 2013
From: Alexandru DAMIAN <alexandru.damian at intel.com>
Clean up of webhob start-up script as to make sure
it aborts the startup on database errors, and
that it doesn't execute superflous kill commands when
stopping.
Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
bitbake/bin/webhob | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/bitbake/bin/webhob b/bitbake/bin/webhob
index 099f2d3..aa35294 100755
--- a/bitbake/bin/webhob
+++ b/bitbake/bin/webhob
@@ -39,9 +39,13 @@ function webserverKillAll()
function webserverStartAll()
{
- python $BBBASEDIR/lib/webhob/manage.py syncdb || (echo "Failed db sync, stopping system start" 1>&2 && return 2)
+ retval=0
+ python $BBBASEDIR/lib/webhob/manage.py syncdb || retval=1
+ if [ $retval -eq 1 ]; then
+ echo "Failed db sync, stopping system start" 1>&2
+ fi
python $BBBASEDIR/lib/webhob/manage.py runserver </dev/null >${BUILDDIR}/whbmain.log 2>&1 & echo $! >${BUILDDIR}/whbmain.pid
- return 0
+ return $retval
}
@@ -125,7 +129,7 @@ case $CMD in
unset BBSERVER
webserverKillAll
# force stop any misbehaving bitbake server
- lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 kill
+ lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
;;
esac
--
1.8.1.2
More information about the bitbake-devel
mailing list