always update allowed hosts
This commit is contained in:
17
install.sh
17
install.sh
@@ -181,14 +181,6 @@ if [ $usegit = False ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 "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
|
echo -e "STATIC_ROOT = os.path.join(BASE_DIR, 'static')" >> config/settings.py
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
@@ -206,6 +198,15 @@ if [ $usegit = True ] ; then
|
|||||||
pip install -r requirements.txt 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc
|
pip install -r requirements.txt 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc
|
||||||
fi
|
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
|
# collect static, migrate
|
||||||
echo -e "\tCollecting static"
|
echo -e "\tCollecting static"
|
||||||
python manage.py collectstatic --noinput 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc
|
python manage.py collectstatic --noinput 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc
|
||||||
|
|||||||
Reference in New Issue
Block a user