Patchwork [bitbake-devel,72/94] bitbake: webhob: startup script fixing

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 24, 2013, 4:52 p.m.
Message ID <b37e3d269ec46c811775754d24cc03d16877f4c4.1380041477.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/58757/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 24, 2013, 4:52 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Let's not start the webserver if the database sync went wrong.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/bin/webhob | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/bitbake/bin/webhob b/bitbake/bin/webhob
index aa35294..0c4d9ea 100755
--- a/bitbake/bin/webhob
+++ b/bitbake/bin/webhob
@@ -43,8 +43,9 @@  function webserverStartAll()
         python $BBBASEDIR/lib/webhob/manage.py syncdb || retval=1
         if [ $retval -eq 1 ]; then
                 echo "Failed db sync, stopping system start" 1>&2
+        else
+            python $BBBASEDIR/lib/webhob/manage.py runserver </dev/null >${BUILDDIR}/whbmain.log 2>&1 & echo $! >${BUILDDIR}/whbmain.pid
         fi
-        python $BBBASEDIR/lib/webhob/manage.py runserver </dev/null >${BUILDDIR}/whbmain.log 2>&1 & echo $! >${BUILDDIR}/whbmain.pid
         return $retval
 }