]> git.parisson.com Git - telemeta.git/commitdiff
Fix .init
authormathieu <mathieu.boye28@gmail.com>
Sun, 1 May 2016 06:30:51 +0000 (08:30 +0200)
committermathieu <mathieu.boye28@gmail.com>
Sun, 1 May 2016 06:30:51 +0000 (08:30 +0200)
.gitignore
app/.init [deleted file]
app/scripts/app.sh

index 466524d1c7e5c8ebc190037e779b70816dc91eab..ffba4045346537cba343d151a9b1a93e0ae45611 100644 (file)
@@ -17,7 +17,7 @@ sdist
 develop-eggs
 .installed.cfg
 *.directory
-.init
+app/.init
 
 # Installer logs
 pip-log.txt
diff --git a/app/.init b/app/.init
deleted file mode 100644 (file)
index e69de29..0000000
index a14c9e559f84f933438c978705a76564f572fe4f..46288981e0dd9ff5137039cb94c6a7b6556cfe0a 100644 (file)
@@ -24,7 +24,8 @@ patterns='*.js;*.css;*.jpg;*.jpeg;*.gif;*.png;*.svg;*.ttf;*.eot;*.woff;*.woff2'
 sh $app/scripts/wait.sh
 
 #fix contains haystack elasticsearch
-cd /opt/miniconda/lib/python2.7/site-packages/haystack/backends && sed -i "s/'contains': u'%s'/'contains': u'*%s*'/g" elasticsearch_backend.py && cd $app
+sed -i "s/'contains': u'%s'/'contains': u'*%s*'/g" /opt/miniconda/lib/python2.7/site-packages/haystack/backends/elasticsearch_backend.py && cd $app
+cat /opt/miniconda/lib/python2.7/site-packages/haystack/backends | grep contains
 
 # django setup
 python $manage wait-for-db
@@ -33,16 +34,13 @@ python $manage migrate --noinput
 python $manage bower_install -- --allow-root
 python $manage collectstatic --noinput
 
-if [ $REINDEX = "True" ]
-then
-python $manage rebuild_index --noinput
-fi
-
 if [ ! -f .init ]; then
     chown -R www-data:www-data $media
     python $manage telemeta-create-admin-user
     python $manage telemeta-create-boilerplate
     touch .init
+elif [ $REINDEX = "True" ]; then
+    python $manage rebuild_index --noinput
 fi
 
 if [ $DEBUG = "False" ]; then