[Toaster] [TOASTER] [PATCH 1/2] toaster: small improvements to the startup script

brian avery avery.brian at gmail.com
Wed Sep 23 16:07:14 PDT 2015


Do not ask th user to create a superuser on running in managed mode

Correctly inherit the env variable WEB_PORT if set in analysis mode

Signed-off-by: brian avery <avery.brian at gmail.com>
---
 bitbake/bin/toaster | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index ac27826..2153282 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -54,11 +54,9 @@ webserverStartAll()
     fi
 
     retval=0
-    if [ "$TOASTER_MANAGED" '=' '1' ]; then
-        python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1
-    else
-        python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1
-    fi
+    # you can always add a superuser later via
+    # python bitbake/lib/toaster/manage.py python manage.py createsuperuser --username=<ME>
+    python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1
     python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2
     if [ $retval -eq 1 ]; then
         echo "Failed db sync, stopping system start" 1>&2
@@ -163,7 +161,9 @@ RUNNING=0
 NOTOASTERUI=0
 WEBSERVER=1
 TOASTER_BRBE=""
-WEB_PORT="8000"
+if [ "WEB_PORT" == "" ]; then
+    WEB_PORT="8000"
+fi
 NOBROWSER=0
 
 for param in $*; do
-- 
1.9.1



More information about the toaster mailing list