diff --git a/install.sh b/install.sh index a0dc514..d6c99cf 100755 --- a/install.sh +++ b/install.sh @@ -181,14 +181,6 @@ if [ $usegit = False ] ; then exit 1 fi - # update allowed hosts - echo -e "echo -e sed -i 's/ALLOWED_HOSTS = []/ALLOWED_HOSTS = ['localhost', os.environ.get('HOST')'] config/settings.py" >> $djalogloc - # | FROM | TO | - sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \['localhost', os.environ.get('HOST')\]/" config/settings.py - if [ $? -ne 0 ] ; then - echo -e "Failed to change ALLOWED_HOSTS. $djamsg" - exit 1 - fi echo -e "echo -e STATIC_ROOT = os.path.join(BASE_DIR, 'static') >> config//settings.py" >> $djalogloc echo -e "STATIC_ROOT = os.path.join(BASE_DIR, 'static')" >> config/settings.py if [ $? -ne 0 ] ; then @@ -206,6 +198,15 @@ if [ $usegit = True ] ; then pip install -r requirements.txt 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc fi +# update allowed hosts +echo -e "echo -e sed -i 's/ALLOWED_HOSTS = []/ALLOWED_HOSTS = ['localhost', os.environ.get('HOST')'] config/settings.py" >> $djalogloc +# | FROM | TO | +sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \['localhost', os.environ.get('HOST')\]/" config/settings.py +if [ $? -ne 0 ] ; then + echo -e "Failed to change ALLOWED_HOSTS. $djamsg" + exit 1 +fi + # collect static, migrate echo -e "\tCollecting static" python manage.py collectstatic --noinput 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc